SSDB configuration
Note
Important
max open files (maximum number of file descriptors)
, please refer to [1]. Otherwise, you will see in log.txt Too many open files
Similar errors, or Connection reset by peer
errors seen on the client.PS: Use this c1000k tool to test how many concurrent connections your system supports.
Listening network port
server: ip: 127.0.0.1 port: 8888
Default The configuration file listens to the local loopback network 127.0.0.1
, so this SSDB server cannot be connected from other machines. If you want to connect to the SSDB server from other machines, you must change 127.0.0.1
For 0.0.0.0
.
At the same time, use the deny, allow
directive of the configuration file to restrict trusted source IP access.
warn!
0.0.0.0
IP may cause your data to be accessed by any machine, which is likely to be a security issue! You can combine the iptables of the operating system to limit network access .Synchronization and Replication
- See Synchronization and Replication
Log Configuration
Also see Log analysis.
- ##logger.level
Log level
debug, warn, error, fatal.
logger.level to
debug level.
logger.output
Log output
You can directly write the relative path or absolute path. If the path is relative, it is a relative configuration file. The directory where it is located.
If you want to output logs to the terminal screen, edit ssdb.conf and change
logger: output: log.txt
to
logger: output: stdout
logger.rorate.size
Log rotation and cleaning
Set the size of the log when splitting, the unit is the number of bytes. According to the default configuration, the log will be split according to the size of 1000MB Split, the format of the split file name is: log.txt.20150723-230422
.
The split log file will not be automatically cleaned, you need to write it yourself crontab script to clean up.
Memory occupation
The memory occupied by an ssdb-server instanceInstantly(It is possible, and even if it is reached, it will only last for a short period of time) The maximum reaches (MB):
cache_size + write_buffer_size 66 + 32
This is the case when the compression option is not turned on. If compression: yes
, the calculation formula is:
cache_size + 10 write_buffer_size * 66 + 32
You can adjust the configuration parameters to limit the memory of ssdb-server Occupied.