Redis configuration file

Source: Internet
Author: User
Tags ack redis syslog

(based on Redis 2.6)

Base section Settings:

Daemonize No

#默认情况下redis is not running in the daemon mode.

Pidfile/var/run/redis.pid

#在守护进程模式下, the location where the PID process number file path is stored

Port 6379

#监听的端口号, set to 0, Redis will not listen to TCP connections;

Bind 127.0.0.1

#绑定本机单一网卡适配器, the default is all network adapters on this computer

Unixsocket/tmp/redis.sock

Unixsocketperm 755

#默认情况下 Redis is not established by UNIX socket connection;

Timeout 0

#客户端空闲n秒后断开连接; 0 means not active disconnect;

Tcp-keepalive 0

#在linux上, each time sends the empty packet of so_keepalive ack; The recommended value is 60s;

Two reasons to do this:

1. Prevent a command from being disconnected as long as it reaches the timeout timeout period;

2, improve the connection error detection

(For a long idle TCP connection, it is easy to close the NAT, firewall, etc. directly.) In this case, the client and server are not aware of the operation without IO. In addition, like the server program or network (hardware) suddenly crash off, the same situation. )

Using KeepAlive, the kernel will periodically help you send an empty ACK packet, if the connection is disconnected or the network unreachable, you will receive a RST.

LogLevel Notice

#记录日志的级别:

Debug: Contains all the information, mainly used in the development environment;

Verbose: Displays only useful information compared to debug;

Notice: Recommended configuration for production environment

Warning: Only important, error and critical information are recorded;

LogFile stdout

#日志文件记录位置, if the mode of the Daemonize daemon is adopted and the parameter value is stdout, then logs is redirected to/dev/null

Syslog-enabled No

#将日志信息记录到 the syslog file. default is not allowed;

Syslog-facility local0 (must be local 0--7)

Log Device as Syslog

Databases 16

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.