LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (http://www.linuxquestions.org/questions/linux-general-1/)
-   -   apache suddenly stopped working (http://www.linuxquestions.org/questions/linux-general-1/apache-suddenly-stopped-working-384019/)

newlinuxnewbie 11-17-2005 12:03 PM

apache suddenly stopped working
 
Sites can't be accessed but can still be pinged. The culprit is apache but it is still running, not stopped. Restarting apache gets the sites back up. Nothing unusual in the error log. This happens constantly.

So apache suddenly stops working (though it is still running). Please help me.

fouldsy 11-17-2005 01:20 PM

Other than in the Apache logs, do the standard system logs show any activity occuring which is causing Apache to lock? And when you constantly, give us a time frame - how often is it occuring and is it only when certain sites are accessed, etc.?

newlinuxnewbie 11-17-2005 06:07 PM

Nothing unusual in all the logs. Happens daily, every 16-24 hours. There's only 1 site on the server and it's barely getting any traffic.

fouldsy 11-18-2005 04:20 AM

Do you have any cron jobs scheduled to run, and is there any pattern to halt times? Does the rest of the machine stay up and running, meaning it's *just* Apache that stops? Would expect something to written to logs that causing it to fail. Have you made any recent changes to your Apache config such as installing new modules?

newlinuxnewbie 11-18-2005 08:44 AM

No cron jobs setup. Now my other server is having the same problem, site pingable but apache not working. I can't even login via SSH on this server.

fouldsy 11-18-2005 08:53 AM

Right, rather than looking at Apache, could be core networking if SSH doesn't respond. When you say sites are pingable, do you mean you can ping outside from your server or what? What network card are you using and what module is loaded? Can you physically ping your server when Apache + SSH stop working. What about FTP access?

newlinuxnewbie 11-18-2005 09:07 AM

Server is pingable when apache and ssh stop working. Site is pingable from outside. FTP is not running. The problem is fixed after a server reboot or restarting apache. Don't know why its happening to both servers.

fouldsy 11-18-2005 09:27 AM

I like a challenge, but's a good one! Loose network services, but network connectivity not affected... You say it's now affecting another server - have any updates been applied across them both? Also, maybe read through http://httpd.apache.org/dev/debugging.html for info on obtaining debug information from Apache to analyse it's point of failure.

newlinuxnewbie 11-18-2005 09:36 AM

I think the 2 server's problems may be unrelated. The 2nd server is due to swap being used fully and that cut off apache and ssh. The 1st server don't have any swap issues but have the same problem. Going to take a look at that debug info. Thanks.

fouldsy 11-18-2005 09:44 AM

I'd be impressed if both physical + swap memory was all used up. What are the specs of the server? Also, you could look adjusting the priority using nice or renice (check the man pages) to ensure ssh is give higher priority when the system is low on memory. This would keep a connection session open if you needed to get in. As for the debug info, let us know how it goes.

newlinuxnewbie 11-18-2005 09:49 AM

Here's a screen shot of the 2nd server's memory/swap being sucked dry.
http://img364.imageshack.us/img364/4...shedbad0hb.gif

The 1st server don't have any load/ram issues but still have the same problem.

fouldsy 11-18-2005 10:06 AM

Just as an extra note until you try some of those debugging ideas, you have a *lot* of processes running according to top there. How many instances of apache do you have spawned, and what else is running on the machine? Have you tried stopping all other services except apache and those related to it such as MySQL and see if you still encounter problems? Of course, if server 1 does not have memory problems, will need to see what the debug stuff returns.

newlinuxnewbie 11-18-2005 10:16 AM

The servers are tweaked to handle a lot of load, 100+ apache processes should not take the server down. http://img367.imageshack.us/img367/728/ss0012ns.gif

Server 2 I know what it is, just need to replace the script. Server 1, still have no idea what could be causing it to go down.

msound 11-18-2005 11:11 AM

The next time apache goes down open up the command line and run:
Code:

netstat -an | grep 80
Even the the process is still running, im curios to see if the service is still Listening on port 80.

Also when you say the site goes down, what page gets displayed when you type in your website's URL?

newlinuxnewbie 11-18-2005 11:18 AM

I might not have a chance to try that, it'll kick me out of SSH and can't connect to it anymore. If it doesn't, I'll try it out.

When the site goes down, I go to the URL, it's a white page, looks like it's still loading, even after 10 minutes same thing.


All times are GMT -5. The time now is 07:31 PM.