redisLog(REDIS_WARNING,"Redis needs to enable the AOF but can't open the append only file: %s",strerror(errno));
serverLog(REDIS_WARNING,"Redis needs to enable the AOF but can't open the append only file: %s",strerror(errno));
returnREDIS_ERR;
}
if(rewriteAppendOnlyFileBackground()==REDIS_ERR){
close(server.aof_fd);
redisLog(REDIS_WARNING,"Redis needs to enable the AOF but can't trigger a background AOF rewrite operation. Check the above logs for more info about the error.");
serverLog(REDIS_WARNING,"Redis needs to enable the AOF but can't trigger a background AOF rewrite operation. Check the above logs for more info about the error.");
returnREDIS_ERR;
}
/* We correctly switched on AOF, now wait for the rewrite to be complete
/* Otherwise fall trough, and go write since we can't wait
* over two seconds. */
server.aof_delayed_fsync++;
redisLog(REDIS_NOTICE,"Asynchronous AOF fsync is taking too long (disk is busy?). Writing the AOF buffer without waiting for fsync to complete, this may slow down Redis.");
serverLog(REDIS_NOTICE,"Asynchronous AOF fsync is taking too long (disk is busy?). Writing the AOF buffer without waiting for fsync to complete, this may slow down Redis.");
}
}
/* We want to perform a single write. This should be guaranteed atomic
redisLog(REDIS_WARNING,"Can't seek the end of the AOF file: %s",
serverLog(REDIS_WARNING,"Can't seek the end of the AOF file: %s",
strerror(errno));
}else{
redisLog(REDIS_WARNING,
serverLog(REDIS_WARNING,
"AOF loaded anyway because aof-load-truncated is enabled");
gotoloaded_ok;
}
}
}
redisLog(REDIS_WARNING,"Unexpected end of file reading the append only file. You can: 1) Make a backup of your AOF file, then use ./redis-check-aof --fix <filename>. 2) Alternatively you can set the 'aof-load-truncated' configuration option to yes and restart the server.");
serverLog(REDIS_WARNING,"Unexpected end of file reading the append only file. You can: 1) Make a backup of your AOF file, then use ./redis-check-aof --fix <filename>. 2) Alternatively you can set the 'aof-load-truncated' configuration option to yes and restart the server.");
exit(1);
fmterr:/* Format error. */
redisLog(REDIS_WARNING,"Bad file format reading the append only file: make a backup of your AOF file, then use ./redis-check-aof --fix <filename>");
serverLog(REDIS_WARNING,"Bad file format reading the append only file: make a backup of your AOF file, then use ./redis-check-aof --fix <filename>");
exit(1);
}
...
...
@@ -1011,7 +1011,7 @@ int rewriteAppendOnlyFile(char *filename) {
redisLog(REDIS_WARNING,"WARNING: the new maxmemory value set via CONFIG SET is smaller than the current memory usage. This will result in keys eviction and/or inability to accept new write commands depending on the maxmemory-policy.");
serverLog(REDIS_WARNING,"WARNING: the new maxmemory value set via CONFIG SET is smaller than the current memory usage. This will result in keys eviction and/or inability to accept new write commands depending on the maxmemory-policy.");
redisLog(REDIS_WARNING,"Timeout receiving bulk data from MASTER... If the problem persists try to set the 'repl-timeout' parameter in redis.conf to a larger value.");
serverLog(REDIS_WARNING,"Timeout receiving bulk data from MASTER... If the problem persists try to set the 'repl-timeout' parameter in redis.conf to a larger value.");
redisLog(REDIS_WARNING,"Lua slow script detected: still in execution after %lld milliseconds. You can try killing the script using the SCRIPT KILL command.",elapsed);
serverLog(REDIS_WARNING,"Lua slow script detected: still in execution after %lld milliseconds. You can try killing the script using the SCRIPT KILL command.",elapsed);
server.lua_timedout=1;
/* Once the script timeouts we reenter the event loop to permit others
* to call SCRIPT KILL or SHUTDOWN NOSAVE if needed. For this reason
redisLog(REDIS_WARNING,"WARNING: The TCP backlog setting of %d cannot be enforced because /proc/sys/net/core/somaxconn is set to the lower value of %d.",server.tcp_backlog,somaxconn);
serverLog(REDIS_WARNING,"WARNING: The TCP backlog setting of %d cannot be enforced because /proc/sys/net/core/somaxconn is set to the lower value of %d.",server.tcp_backlog,somaxconn);
}
}
fclose(fp);
...
...
@@ -1721,7 +1721,7 @@ int listenToPort(int port, int *fds, int *count) {
"There is a child rewriting the AOF. Killing it!");
kill(server.aof_child_pid,SIGUSR1);
}
/* Append only file: fsync() the AOF and exit */
redisLog(REDIS_NOTICE,"Calling fsync() on the AOF file.");
serverLog(REDIS_NOTICE,"Calling fsync() on the AOF file.");
aof_fsync(server.aof_fd);
}
if((server.saveparamslen>0&&!nosave)||save){
redisLog(REDIS_NOTICE,"Saving the final RDB snapshot before exiting.");
serverLog(REDIS_NOTICE,"Saving the final RDB snapshot before exiting.");
/* Snapshotting. Perform a SYNC SAVE and exit */
if(rdbSave(server.rdb_filename)!=REDIS_OK){
/* Ooops.. error saving! The best we can do is to continue
...
...
@@ -2417,17 +2417,17 @@ int prepareForShutdown(int flags) {
* in the next cron() Redis will be notified that the background
* saving aborted, handling special stuff like slaves pending for
* synchronization... */
redisLog(REDIS_WARNING,"Error trying to save the DB, can't exit.");
serverLog(REDIS_WARNING,"Error trying to save the DB, can't exit.");
returnREDIS_ERR;
}
}
if(server.daemonize||server.pidfile){
redisLog(REDIS_NOTICE,"Removing the pid file.");
serverLog(REDIS_NOTICE,"Removing the pid file.");
unlink(server.pidfile);
}
/* Close the listening sockets. Apparently this allows faster restarts. */
closeListeningSockets(1);
redisLog(REDIS_WARNING,"%s is now ready to exit, bye bye...",
serverLog(REDIS_WARNING,"%s is now ready to exit, bye bye...",
server.sentinel_mode?"Sentinel":"Redis");
returnREDIS_OK;
}
...
...
@@ -3444,10 +3444,10 @@ int linuxOvercommitMemoryValue(void) {
voidlinuxMemoryWarnings(void){
if(linuxOvercommitMemoryValue()==0){
redisLog(REDIS_WARNING,"WARNING overcommit_memory is set to 0! Background save may fail under low memory condition. To fix this issue add 'vm.overcommit_memory = 1' to /etc/sysctl.conf and then reboot or run the command 'sysctl vm.overcommit_memory=1' for this to take effect.");
serverLog(REDIS_WARNING,"WARNING overcommit_memory is set to 0! Background save may fail under low memory condition. To fix this issue add 'vm.overcommit_memory = 1' to /etc/sysctl.conf and then reboot or run the command 'sysctl vm.overcommit_memory=1' for this to take effect.");
}
if(THPIsEnabled()){
redisLog(REDIS_WARNING,"WARNING you have Transparent Huge Pages (THP) support enabled in your kernel. This will create latency and memory usage issues with Redis. To fix this issue run the command 'echo never > /sys/kernel/mm/transparent_hugepage/enabled' as root, and add it to your /etc/rc.local in order to retain the setting after a reboot. Redis must be restarted after THP is disabled.");
serverLog(REDIS_WARNING,"WARNING you have Transparent Huge Pages (THP) support enabled in your kernel. This will create latency and memory usage issues with Redis. To fix this issue run the command 'echo never > /sys/kernel/mm/transparent_hugepage/enabled' as root, and add it to your /etc/rc.local in order to retain the setting after a reboot. Redis must be restarted after THP is disabled.");
}
}
#endif /* __linux__ */
...
...
@@ -3520,7 +3520,7 @@ void redisAsciiArt(void) {
elsemode="standalone";
if(server.syslog_enabled){
redisLog(REDIS_NOTICE,
serverLog(REDIS_NOTICE,
"Redis %s (%s/%d) %s bit, %s mode, port %d, pid %ld ready to start.",
"Sentinel needs config file on disk to save state. Exiting...");
exit(1);
}
...
...
@@ -3858,7 +3858,7 @@ int main(int argc, char **argv) {
loadServerConfig(configfile,options);
sdsfree(options);
}else{
redisLog(REDIS_WARNING,"Warning: no config file specified, using the default config. In order to specify a config file use %s /path/to/%s.conf",argv[0],server.sentinel_mode?"sentinel":"redis");
serverLog(REDIS_WARNING,"Warning: no config file specified, using the default config. In order to specify a config file use %s /path/to/%s.conf",argv[0],server.sentinel_mode?"sentinel":"redis");
redisLog(REDIS_WARNING,"WARNING: You specified a maxmemory value that is less than 1MB (current value is %llu bytes). Are you sure this is what you really want?",server.maxmemory);
serverLog(REDIS_WARNING,"WARNING: You specified a maxmemory value that is less than 1MB (current value is %llu bytes). Are you sure this is what you really want?",server.maxmemory);