These forums are locked and archived, but all topics have been migrated to the new forum. You can search for this topic on the new forum: Search for Weekly logrotate causes websites to go down on the new forum.
I would like to enable monitoring for all my websites, howevere there is a problem that needs to be solved first: whenever the weekly cron runs, which involves logrotating apache files with apache reloading for each site, the monitoring detects the site is down and sends an email alert. Also, I often get errors like "cannot fork" and the like. After a few minutes, everything is back to normal. Usually... Is there any way to avoid this? Also, I would like to enable monitoring but send the notification to me only, not to the domain owners. I don't want to be bothered each week about sites allegedly being down. Is this possible?
This, especially the "cannot fork" part, sounds like the logrotation and Apache reload might use too many resources and run into trouble. Is there anything in the syslog at the time of rotation? Any error messages? Are you using an OpenVZ virtual machine maybe?
hmmm looks like the system ran out of memory and the kernel killed a few apache and php5 processes, which could explain why this sunday a couple of websites stopped working with no fcgi process slots left... i don't have the syslog of last week so can't see what happened there. maybe next sunday i just should stay awake and see what is going on
Or you could instruct your log rotation to keep more previous syslog files. :)
Did that already, extended from 7 to 30 days :) I could also disable compression for the apache logfiles, that should lower the load a bit i guess, but then that would have an impact on the quota. Is there a way to exclude log files from quota calculation?
Are you by chance using "writelogs"?
For example, what does this output:
ps auxw | grep writelogs
Also, what Linux distro are you using... is it by chance CentOS?
-Eric
no writelogs. i'm using debian 7.1