[FASTCGI] logging from fcgi
headset001 at yahoo.com
Sun Sep 23 12:46:44 EDT 2012
I decided to put:
if ! ps -A | grep fcgi > /dev/null; then
/usr/sbin/logrotate /etc/logrotate.conf; fi
in /etc/cron.daily/logrotate to stop log rotation while fcgi is running.
The other solution which I thought about, to catch the terminate signal in myapp.fcgi and save the state to disk and load it when started again is cumbersome and still it could lose some client access requests while apache is restarted.
I don't know why logrotate needs to restart apache. I don't know why /etc/init.d/sysklogd reload stops myapp.fcgi from writing to myapp.log, while apache still can write to access.log.
I thought that the problem that apache is configured to work on a access request basis while fcgi works on a connection basis was met by several people and that I would receive some advice.
More information about the FastCGI-developers