Tag Archive ‘FreeBSD’

 

CharlyBr on Oct 2nd, 2008Use multiple memcached daemons on FreeBSD

As you may know, when using memcached on 32-bit servers, processes can only address 4GB of virtual memory making the memcached daemon handle only 2 or 3 Gb of memory.
If you want to address more memory, you need to launch multiple memcached daemons.
I wrote an rc script , mmemcached, for FreeBSD to manage this.
To use [...]

CharlyBr on Jul 17th, 2008Rotate Nginx log files under FreeBSD

To rotate your nginx log files, you can use the log file handler provided by FreeBSD: newsyslog.
Configuring /etc/newsyslog.conf
/var/log/nginx-access.log               644  7     1024 *     JC /var/run/nginx.pid
/var/log/nginx-error.log                644  7     1024 *     JC /var/run/nginx.pid
Before log rotation:
-rw-r–r–  1 root  wheel    104278002 Jul 16 11:35 nginx-access.log
-rw-r–r–  1 root  wheel      1509531 Jul 16 11:17 nginx-error.log
After log rotation:
-rw-r–r–  1 root  wheel        967 Jul [...]