var sidebar_align = 'right';
var content_container_margin = parseInt('350px');
var sidebar_width = parseInt('330px');
apache 2.0.40 crashing every night
What to do?
Where to look for causes?
It stops serving pages, that is all connections are refused, but httpd is still running. After I restart it, it works fine.
what are the loads on the server ? how many sites/page views are you getting when it crashes ? Are the sites MySQL intensive ?
Need a bit more info first mate
Loads are < 1.00
Fair bit of mysql usage
Can it be - in general - related to having a very long constant uptime of the OS (192 days)? I have just now had it rebooted, to see if it has any effect.
The machine is a PIII 733 with 256 RAM.
Having a uptime is very hazardous to security. It means you have not updated your kernel for 6 months, and this is a major hazard.
Anyway, regarding your apache issue, have you changed your apache config at all ? or left stock since you get server ?
I updated apache from 1.3.something about a week ago. Had to manually migrate my sites to httpd.conf
Yes, I know I should update my kernel. Everything else is up2date. I just heard that updating kernel remotely is a risky thing. Perhaps I should ask my isp if they can be bothered to do it? :-)
(this server is not offering hosting to third parties, only my own sites on it and only ONE ssh account )
Updating kernel through SSH isnt a problem as long as you have done it a few times before, and are sure you kno what your doing. If new kernel doesnt boot, you would need your ISP to boot into your old kernel for you.
Sounds like you need to modify your apache settings, but I am only familair with 1.3 so i cant really offer any tweaks. Id suggest getting a server admin like ryan of rfx, or steve from rack911 to take a look for you.
Ok, thank you. I made an inquery to my ISP regarding kernel updating. I never did that before, but I would be doing it through up2date simply updating the stock RH9 kernel. Depending on what help my isp will do I may try it (and have them put back old kernel if it fails)..
After updating kernel (and this reboot) I will give it a few days and see what happens. If it does not work I'll see about external help.
Updating kernel via up2date almost never fails, and you shouldnt strike any problems at all.
just give it a soft reboot once its done, and you shouldnt have any problems.
This problem has nothing to do with your kernel. At all.
One problem with Apache 2.x is that when used with some third party plugins, random crashing occurs. This is due to the lack of multithreading support in some third party modules.
If you change the MPM you're using to the prefork mpm, it should fix your problems. Now the downside to this is it makes Apache act just like apache 1.3 in regards to forking, i.e., it doesn't.
Now if you're already using the prefork mpm, then well, I'm not sure. =)
Can you reply with an excerpt of /var/log/httpd/error_log from when this occurs? If possible /var/log/messages as well might be helpful.
If it is the same time every night, then it could be logrotate (check your configuration files in /etc/logrotate.conf and /etc/logrotate.d or it could be a cron job.
For cron, check
crontab -l as well as any user cron tabs.
Thank you for the replies. I'm looking into it :-)
dynamicnet, it does appear to be crashing at the same time, so that some program in cron.daily is causing it may be likely.
Notice be crash I mean what I said earlier--- it stops serving pages, but httpd process still runs, when I restart service httpd it works smoothly again.
These are the daily jobs:
00-logwatch -> ../log.d/scripts/logwatch.pl*
*what does this job do? I'm uncertain :/
Also my logrotate.conf and logrotate.d/ looks pretty basic. What could cause logrotate to crash?
If logrotate.conf or the entries in /etc/logrotate.d contain a syntax error, then logrotate can cause a crash.
On the "*" if you google just the name, you can find out a lot.
A quick question on the files in /etc/logrotate.d
Is there suppose to be a "apache" file AND a "httpd" file there? I think they more or less contain the same thing.
EDIT: I googled those commands as you suggested. I cant find what fw is still :/ The others I found I feel I understand now (atleast what their function is :-).
Last edited by beowulfdk; 04-20-2004 at
try upgrading your apache is well, seems its more then your kernel that is out of date.
The file name is generally meaningful to what it does.
In theory, there should be only one log rotation for Apache (presuming you are only running one version et all).
So I would examine httpd (Apache) and the apche.
If you went from 1.3.xx to 2.xx.xx, did it keep the old log rotate?
In Apache 2.0.49 (or with patches against 1.3) you can use --enable-exception-hook. In conjunction with mod_backtrace (just google it...) you can catch those random crashes with a complete backtrace and see what is going wrong.