{"action":"created","issue":{"url":"https://api.github.com/repos/MSOpenTech/redis/issues/289","labels_url":"https://api.github.com/repos/MSOpenTech/redis/issues/289/labels{/name}","comments_url":"https://api.github.com/repos/MSOpenTech/redis/issues/289/comments","events_url":"https://api.github.com/repos/MSOpenTech/redis/issues/289/events","html_url":"https://github.com/MSOpenTech/redis/issues/289","id":99267348,"number":289,"title":"Redis bgsave fails and prevents any further persistence","user":{"login":"JeHoDe","id":11443981,"avatar_url":"https://avatars.githubusercontent.com/u/11443981?v=3","gravatar_id":"","url":"https://api.github.com/users/JeHoDe","html_url":"https://github.com/JeHoDe","followers_url":"https://api.github.com/users/JeHoDe/followers","following_url":"https://api.github.com/users/JeHoDe/following{/other_user}","gists_url":"https://api.github.com/users/JeHoDe/gists{/gist_id}","starred_url":"https://api.github.com/users/JeHoDe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JeHoDe/subscriptions","organizations_url":"https://api.github.com/users/JeHoDe/orgs","repos_url":"https://api.github.com/users/JeHoDe/repos","events_url":"https://api.github.com/users/JeHoDe/events{/privacy}","received_events_url":"https://api.github.com/users/JeHoDe/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-08-05T18:23:52Z","updated_at":"2015-08-05T18:37:58Z","closed_at":null,"body":"I'm runnin redis as a windows service (with the default settings). From time to time the bgsave command fails. I only can resolve this issue by re-starting the service (and loosing all data since the last successful bgsave :-( ) This is what the redis info command says (the info command has been run after the service restart):\r\n\r\n# Server\r\nredis_version:2.8.19\r\nredis_git_sha1:00000000\r\nredis_git_dirty:0\r\nredis_build_id:9968db13395be4aa\r\nredis_mode:standalone\r\nos:Windows\r\narch_bits:64\r\nmultiplexing_api:winsock_IOCP\r\ngcc_version:0.0.0\r\nprocess_id:1208\r\nrun_id:de4f7916b1a32b53648cd774ebe3a5f95e64d5a0\r\ntcp_port:6379\r\nuptime_in_seconds:9626\r\nuptime_in_days:0\r\nhz:10\r\nlru_clock:12735354\r\nconfig_file:C:\\Program Files\\Redis\\redis_store.conf\r\n\r\n# Clients\r\nconnected_clients:1\r\nclient_longest_output_list:0\r\nclient_biggest_input_buf:0\r\nblocked_clients:0\r\n\r\n# Memory\r\nused_memory:131435032\r\nused_memory_human:125.35M\r\nused_memory_rss:131383704\r\nused_memory_peak:132169328\r\nused_memory_peak_human:126.05M\r\nused_memory_lua:35840\r\nmem_fragmentation_ratio:1.00\r\nmem_allocator:dlmalloc-2.8\r\n\r\n# Persistence\r\nloading:0\r\nrdb_changes_since_last_save:16\r\nrdb_bgsave_in_progress:0\r\nrdb_last_save_time:1438798500\r\nrdb_last_bgsave_status:ok\r\nrdb_last_bgsave_time_sec:1438798501\r\nrdb_current_bgsave_time_sec:-1\r\naof_enabled:0\r\naof_rewrite_in_progress:0\r\naof_rewrite_scheduled:0\r\naof_last_rewrite_time_sec:-1\r\naof_current_rewrite_time_sec:-1\r\naof_last_bgrewrite_status:ok\r\naof_last_write_status:ok\r\n\r\n# Stats\r\ntotal_connections_received:1146\r\ntotal_commands_processed:19651\r\ninstantaneous_ops_per_sec:1\r\ntotal_net_input_bytes:963058\r\ntotal_net_output_bytes:0\r\ninstantaneous_input_kbps:0.04\r\ninstantaneous_output_kbps:0.00\r\nrejected_connections:0\r\nsync_full:1\r\nsync_partial_ok:0\r\nsync_partial_err:0\r\nexpired_keys:0\r\nevicted_keys:0\r\nkeyspace_hits:44\r\nkeyspace_misses:1217\r\npubsub_channels:0\r\npubsub_patterns:0\r\nlatest_fork_usec:93601\r\n\r\n# Replication\r\nrole:master\r\nconnected_slaves:1\r\nslave0:ip=62.50.117.49,port=6379,state=online,offset=233779,lag=1\r\nmaster_repl_offset:233779\r\nrepl_backlog_active:1\r\nrepl_backlog_size:1048576\r\nrepl_backlog_first_byte_offset:2\r\nrepl_backlog_histlen:233778\r\n\r\n# CPU\r\nused_cpu_sys:11.28\r\nused_cpu_user:2.11\r\nused_cpu_sys_children:0.00\r\nused_cpu_user_children:0.00\r\n\r\n# Keyspace\r\ndb0:keys=375844,expires=0,avg_ttl=0\r\n\r\n# Logfile\r\n\r\nHere is the relevant part of the logfile:\r\n\r\n[1716] 05 Aug 06:49:32.088 * Background saving terminated with success\r\n[1716] 05 Aug 06:54:33.045 * 10 changes in 300 seconds. Saving...\r\n[1716] 05 Aug 06:54:34.652 # fork operation complete\r\n[1716] 05 Aug 06:54:34.839 * Background saving terminated with success\r\n[1716] 05 Aug 06:59:35.001 * 10 changes in 300 seconds. Saving...\r\n[1716] 05 Aug 06:59:36.841 # fork operation complete\r\n[1716] 05 Aug 06:59:37.075 * Background saving terminated with success\r\n[1716] 05 Aug 07:04:38.033 * 10 changes in 300 seconds. Saving...\r\n[1716] 05 Aug 07:04:38.033 # BeginForkOperation: system error caught. error code=0x000005af, message=BeginForkOperation: VirtualProtect failed: unknown error\r\n\r\n[1716] 05 Aug 07:04:38.033 # Can't save in background: fork: Invalid argument\r\n[1716] 05 Aug 07:04:38.142 * 10 changes in 300 seconds. Saving...\r\n[1716] 05 Aug 07:04:39.905 # fork operation complete\r\n[1716] 05 Aug 07:04:40.092 * Background saving terminated with success\r\n[1716] 05 Aug 07:09:41.002 * 10 changes in 300 seconds. Saving...\r\n[1716] 05 Aug 07:09:41.002 # BeginForkOperation: system error caught. error code=0x000005af, message=BeginForkOperation: VirtualProtect failed: unknown error\r\n\r\n[1716] 05 Aug 07:09:41.002 # Can't save in background: fork: Invalid argument\r\n[1716] 05 Aug 07:09:41.111 * 10 changes in 300 seconds. Saving...\r\n[1716] 05 Aug 07:09:41.111 # BeginForkOperation: system error caught. error code=0x000005af, message=BeginForkOperation: VirtualProtect failed: unknown error\r\n\r\n[1716] 05 Aug 07:09:41.111 # Can't save in background: fork: Invalid argument\r\n[1716] 05 Aug 07:09:41.221 * 10 changes in 300 seconds. Saving...\r\n[1716] 05 Aug 07:09:43.030 # fork operation complete\r\n[1716] 05 Aug 07:09:43.217 * Background saving terminated with success\r\n[1716] 05 Aug 07:14:44.034 * 10 changes in 300 seconds. Saving...\r\n[1716] 05 Aug 07:14:44.034 # BeginForkOperation: system error caught. error code=0x000005af, message=BeginForkOperation: VirtualProtect failed: unknown error\r\n\r\n[1716] 05 Aug 07:14:44.034 # Can't save in background: fork: Invalid argument\r\n[1716] 05 Aug 07:14:44.143 * 10 changes in 300 seconds. Saving...\r\n[1716] 05 Aug 07:14:44.143 # BeginForkOperation: system error caught. error code=0x000005af, message=BeginForkOperation: VirtualProtect failed: unknown error\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/MSOpenTech/redis/issues/comments/128103146","html_url":"https://github.com/MSOpenTech/redis/issues/289#issuecomment-128103146","issue_url":"https://api.github.com/repos/MSOpenTech/redis/issues/289","id":128103146,"user":{"login":"enricogior","id":3206696,"avatar_url":"https://avatars.githubusercontent.com/u/3206696?v=3","gravatar_id":"","url":"https://api.github.com/users/enricogior","html_url":"https://github.com/enricogior","followers_url":"https://api.github.com/users/enricogior/followers","following_url":"https://api.github.com/users/enricogior/following{/other_user}","gists_url":"https://api.github.com/users/enricogior/gists{/gist_id}","starred_url":"https://api.github.com/users/enricogior/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/enricogior/subscriptions","organizations_url":"https://api.github.com/users/enricogior/orgs","repos_url":"https://api.github.com/users/enricogior/repos","events_url":"https://api.github.com/users/enricogior/events{/privacy}","received_events_url":"https://api.github.com/users/enricogior/received_events","type":"User","site_admin":false},"created_at":"2015-08-05T18:37:58Z","updated_at":"2015-08-05T18:37:58Z","body":"Hi @JeHoDe,\r\nthank you for reporting the issue.\r\nThe problem seems caused by the fact that the system paging file is not large enough or is too fragmented to map the virtual memory of the child process.\r\nPlease take the time to read the [Memory Configuration]( https://github.com/MSOpenTech/redis/wiki/Memory-Configuration) wiki page.\r\nAlso, consider updating to the latest [v2.8.2101 release](https://github.com/MSOpenTech/redis/releases/tag/win-2.8.2101).\r\nIf the problem still persists, please let us know.\r\n"}}