Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I am running apache in linux, and about twice a day my apache server goes down. I have a site with php and mysql where people log onto a web page and reply to messages.
When the server goes down they can not load the page.
At the moment I am going through my apache logs (error_log and access_log) but there is no error reported in the error_log and the data in the access_log looks normal (all the GETS and POSTS with HTTP 200, or a few 304's).
How do you find out what file or process is causing this behaviour? Are there any other logs I can be looking into to see what stops the server?
Which Linux distro and Apache version? A bad page request should never crash the server assuming you're keeping it up to date and bug free. Are there any patterns as to when it occurs? Problems like this can be difficult to diagnose, so you're best bet is to look for patterns of behavior. Has anything else been flaky on the machine?
No patterns I can see.
Its kept down to mainly one file being called, but by a few users. This page has quite a lot of processing to do with the database.
I only ever had this problem once in a while, but now the traffic has increased dramatically its happening much more.
I found this http://www.webhostgear.com/49_print.html on High Traffic Servers which is quite interesting and is a possibility.
I will try these techniques and see if it improves.
Does the httpd process actually die or just quit responding? It could be something as simple as a resources issue. Try looking at netstat output to find suspicious processes, then start debugging from there.
The same thing was happening with Apache on my box about a year ago. Couldn't figure it out for a while, but after adding additional RAM, no more shutdown.
How do i tell if the processes die or quit responding? I have looked in the access_log and when the server goes down there are no more access's written to the file until I restart apache.
Is a GET or a POST a httpd process?
I have tried running netstat from the root in my ssh but it says the cmd is not found. Do I have to run this from a certain directory?
Try looking at the output of ps then. See if the process is still running. No, netstat does not need to be run from a certain directory. You might try using find to locate it if it's not in the usual spots like /bin. You could also try adjusting the Apache LogLevel to see if that gives you any more clues.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.