LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 06-23-2011, 01:01 PM   #1
fruitwerks
Member
 
Registered: Apr 2009
Posts: 80

Rep: Reputation: 15
Apache just dies sometimes


I have been looking into this issue for a long time now and I still can't get to the bottom of it.

The server is Ubuntu 10.04 apache is 2.2 branch...

When it happens, load is not high and memory / swap has plenty of room. Also apache will not deny the connection, it will give the browser some sign of hope because the page will not load or timeout. Nothing will load, not even the apache server-status page.

The second I restart apache, the browser gives the error like the site is down.

Any suggestions of what to look at?

Thanks!
 
Old 06-23-2011, 03:24 PM   #2
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 26,635

Rep: Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965
Quote:
Originally Posted by fruitwerks View Post
I have been looking into this issue for a long time now and I still can't get to the bottom of it.
The server is Ubuntu 10.04 apache is 2.2 branch...

When it happens, load is not high and memory / swap has plenty of room. Also apache will not deny the connection, it will give the browser some sign of hope because the page will not load or timeout. Nothing will load, not even the apache server-status page.

The second I restart apache, the browser gives the error like the site is down.
Any suggestions of what to look at?
Thanks!
The Apache logs would be the very first thing I'd check...but it sounds like you've checked the obvious, and have ruled out the network, system load, memory, and swap. How about disk space, just on an off chance?? Also, depending on how often it happens, have you considered starting Apache with more verbosity in the logs, to see if you catch anything different?
http://www.devshed.com/c/a/Apache/Logging-in-Apache/

Also, some of this may depend on what the page(s) are serving up. Are they PHP, Java, Javascript, and/or database dependent?? Any one of those could be a factor. Restarting Apache may just kill the bad process that's locking things up...
 
Old 06-23-2011, 06:03 PM   #3
fruitwerks
Member
 
Registered: Apr 2009
Posts: 80

Original Poster
Rep: Reputation: 15
Yes, I forgot to mention how much I have put into this. I have sat and tailed the verbose logs - after three times of seeing anything before it happens - I gave up on that front.

Disk space is plentiful, swap / ram is always good - not using selinux or apparmour, ulimit is never reached. No quotas or anything else going on. It is not a network issue - if it is, it is the strangest one I have ever seen. Using a hardware firewall that has never been suspected of anything odd. From the shell (local) I can't load a page using telnet or links / lynx. Those behave similar to a modern browser as I originally explained. Not using any php caches either.

Most of the pages are php and cgi, no java, some mysql, some postgres connections, but these continue to work when apache fails.

If anyone has some more ideas or even some insight
 
Old 06-24-2011, 12:09 AM   #4
Valery Reznic
ELF Statifier author
 
Registered: Oct 2007
Posts: 676

Rep: Reputation: 137Reputation: 137
Quote:
Originally Posted by fruitwerks View Post
Yes, I forgot to mention how much I have put into this. I have sat and tailed the verbose logs - after three times of seeing anything before it happens - I gave up on that front.

Disk space is plentiful, swap / ram is always good - not using selinux or apparmour, ulimit is never reached. No quotas or anything else going on. It is not a network issue - if it is, it is the strangest one I have ever seen. Using a hardware firewall that has never been suspected of anything odd. From the shell (local) I can't load a page using telnet or links / lynx. Those behave similar to a modern browser as I originally explained. Not using any php caches either.

Most of the pages are php and cgi, no java, some mysql, some postgres connections, but these continue to work when apache fails.

If anyone has some more ideas or even some insight
Do you use PHP as module or as CGI?
 
Old 06-24-2011, 06:29 AM   #5
fruitwerks
Member
 
Registered: Apr 2009
Posts: 80

Original Poster
Rep: Reputation: 15
Quote:
Do you use PHP as module or as CGI?
With that, I will mention that this server is running Plesk. I have had a few Plesk developers look into this and they all agree it has nothing to do with Plesk. Most sites are running as a module, but some may be running as CGI / FCGI.

I will also note that we also run a lighttpd instance on the same machine, bound to a different IP. This site relies heavily on PHP and it continues to function while apache is down - and this is unrelated to lighttpd because this issue was present before we started running lighttpd.

Thanks
 
Old 06-24-2011, 07:45 AM   #6
Valery Reznic
ELF Statifier author
 
Registered: Oct 2007
Posts: 676

Rep: Reputation: 137Reputation: 137
Quote:
Originally Posted by fruitwerks View Post
With that, I will mention that this server is running Plesk. I have had a few Plesk developers look into this and they all agree it has nothing to do with Plesk. Most sites are running as a module, but some may be running as CGI / FCGI.

I will also note that we also run a lighttpd instance on the same machine, bound to a different IP. This site relies heavily on PHP and it continues to function while apache is down - and this is unrelated to lighttpd because this issue was present before we started running lighttpd.

Thanks
I think I miss something - if Apache is down how anything website-related can function?
 
Old 06-24-2011, 08:06 AM   #7
fruitwerks
Member
 
Registered: Apr 2009
Posts: 80

Original Poster
Rep: Reputation: 15
I was just noting that if it is somehow a PHP related issue, that the lighttpd instance is not affected by it, it is a separate server on the same machine.
 
Old 06-24-2011, 08:17 AM   #8
Valery Reznic
ELF Statifier author
 
Registered: Oct 2007
Posts: 676

Rep: Reputation: 137Reputation: 137
Quote:
Originally Posted by fruitwerks View Post
I was just noting that if it is somehow a PHP related issue, that the lighttpd instance is not affected by it, it is a separate server on the same machine.
Apache used by default on Ubuntu is multi-threade (it uses MPM worker) PHP is known to be not thread safe.
You can try to use apache with MPM-prefork instead and see if it help.
 
Old 06-24-2011, 08:24 AM   #9
fruitwerks
Member
 
Registered: Apr 2009
Posts: 80

Original Poster
Rep: Reputation: 15
Yes, we are using prefork. here is a modules list.

Code:
 core_module (static)
 log_config_module (static)
 logio_module (static)
 mpm_prefork_module (static)
 http_module (static)
 so_module (static)
 actions_module (shared)
 alias_module (shared)
 auth_basic_module (shared)
 authn_file_module (shared)
 authz_default_module (shared)
 authz_groupfile_module (shared)
 authz_host_module (shared)
 authz_user_module (shared)
 autoindex_module (shared)
 bw_module (shared)
 cgi_module (shared)
 deflate_module (shared)
 dir_module (shared)
 env_module (shared)
 expires_module (shared)
 fcgid_module (shared)
 include_module (shared)
 mime_module (shared)
 negotiation_module (shared)
 perl_module (shared)
 php5_module (shared)
 python_module (shared)
 reqtimeout_module (shared)
 rewrite_module (shared)
 setenvif_module (shared)
 ssl_module (shared)
 status_module (shared)
 suexec_module (shared)
 userdir_module (shared)
 wsgi_module (shared)
If anyone thinks some of these may not be required, I will double check - but Plesk is needy so this is likely fairly minimal
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Login window dies when user authentication dies. Hom Linux - Newbie 2 03-09-2011 05:52 AM
Apache 2.2.8 make dies looking for libexpat.la Infinity Linux - Server 7 02-23-2010 04:26 PM
if qemu dies, my mouse dies with it eantoranz Linux - Software 3 11-02-2007 10:30 PM
Apache httpd dies for strange reason GSMD Linux - Server 3 02-28-2007 01:22 AM
x server dies...dies...dead! aquaboot Linux - Software 2 08-28-2005 11:54 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 10:30 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration