LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
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 04-23-2011, 01:17 PM   #1
AppleH
LQ Newbie
 
Registered: Apr 2011
Posts: 5

Rep: Reputation: 0
Service httpd auto stop


Hi all,
I have VPS and run a website. But every random 10-20 minutes service httpd stop.

My VPS: 768 MB RAM

Quote:
[root@vps ~]# service httpd status
httpd dead but pid file exists
[root@vps ~]#
Error log:
Quote:
[Sat Apr 23 20:44:57 2011] [notice] Digest: done
[Sat Apr 23 20:44:57 2011] [notice] Apache/2.2.3 (CentOS) configured -- resuming normal operations
[Sat Apr 23 20:45:02 2011] [error] server reached MaxClients setting, consider raising the MaxClients setting
[Sat Apr 23 21:09:42 2011] [notice] caught SIGTERM, shutting down
[Sat Apr 23 21:09:44 2011] [notice] suEXEC mechanism enabled (wrapper: /usr/sbin/suexec)
[Sat Apr 23 21:09:44 2011] [notice] Digest: generating secret for digest authentication ...
[Sat Apr 23 21:09:44 2011] [notice] Digest: done
[Sat Apr 23 21:09:44 2011] [notice] Apache/2.2.3 (CentOS) configured -- resuming normal operations
[Sat Apr 23 21:21:07 2011] [notice] caught SIGTERM, shutting down
[Sat Apr 23 21:21:09 2011] [notice] suEXEC mechanism enabled (wrapper: /usr/sbin/suexec)
[Sat Apr 23 21:21:09 2011] [notice] Digest: generating secret for digest authentication ...
[Sat Apr 23 21:21:09 2011] [notice] Digest: done
[Sat Apr 23 21:21:09 2011] [notice] Apache/2.2.3 (CentOS) configured -- resuming normal operations
[Sat Apr 23 21:27:28 2011] [error] server reached MaxClients setting, consider raising the MaxClients setting
[Sat Apr 23 21:31:23 2011] [notice] caught SIGTERM, shutting down
[Sat Apr 23 21:31:24 2011] [notice] suEXEC mechanism enabled (wrapper: /usr/sbin/suexec)
[Sat Apr 23 21:31:24 2011] [notice] Digest: generating secret for digest authentication ...
[Sat Apr 23 21:31:24 2011] [notice] Digest: done
[Sat Apr 23 21:31:24 2011] [notice] Apache/2.2.3 (CentOS) configured -- resuming normal operations
[Sat Apr 23 21:32:03 2011] [notice] caught SIGTERM, shutting down
[Sat Apr 23 21:32:04 2011] [notice] suEXEC mechanism enabled (wrapper: /usr/sbin/suexec)
[Sat Apr 23 21:32:04 2011] [notice] Digest: generating secret for digest authentication ...
[Sat Apr 23 21:32:04 2011] [notice] Digest: done
[Sat Apr 23 21:32:04 2011] [notice] Apache/2.2.3 (CentOS) configured -- resuming normal operations
[Sat Apr 23 21:36:32 2011] [error] server reached MaxClients setting, consider raising the MaxClients setting
[Sun Apr 24 00:48:32 2011] [notice] suEXEC mechanism enabled (wrapper: /usr/sbin/suexec)
[Sun Apr 24 00:48:32 2011] [notice] Digest: generating secret for digest authentication ...
[Sun Apr 24 00:48:32 2011] [notice] Digest: done
[Sun Apr 24 00:48:32 2011] [warn] pid file /etc/httpd/run/httpd.pid overwritten -- Unclean shutdown of previous Apache run?
[Sun Apr 24 00:48:32 2011] [notice] Apache/2.2.3 (CentOS) configured -- resuming normal operations
[Sun Apr 24 00:48:55 2011] [error] server reached MaxClients setting, consider raising the MaxClients setting
Help me plz . Thanks
 
Old 04-23-2011, 02:40 PM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
Not sure if it's directly related, but you're hitting a maxclients limit very clearly... why? Under powered / poorly configured system, or being DDOS'd or similar? Fix that and other more obscure things may well go away. Fix it properly though... don't just make the error message go away.
 
Old 04-23-2011, 09:43 PM   #3
AppleH
LQ Newbie
 
Registered: Apr 2011
Posts: 5

Original Poster
Rep: Reputation: 0
Thank you acid_kewpie.
This is file httpd.conf

...
<IfModule prefork.c>
StartServers 8
MinSpareServers 5
MaxSpareServers 20
ServerLimit 500
MaxClients 500
MaxRequestsPerChild 4000
</IfModule>

<IfModule worker.c>
StartServers 2
MaxClients 150
MinSpareThreads 25
MaxSpareThreads 75
ThreadsPerChild 25
MaxRequestsPerChild 0
</IfModule>

...
Can you help me resolve this problem?
Thank you.
 
Old 04-24-2011, 03:01 AM   #4
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
Not from that. Are you using prefork of worker? you need to understand WHY you are exceeding the number of connections. are you getting flooded? I could never tell that from some config settings. the /server-status page might help you if it's enabled.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
how to register auto start/stop service script with chkconfig travellers Linux - Software 8 06-15-2009 12:02 PM
Service httpd nnadithya Linux - Server 5 12-16-2006 10:08 PM
service httpd status, results in httpd dead but subsys locked squadja Red Hat 2 09-11-2004 11:31 PM
httpd service stop fails, no pid, this after latest update squadja Red Hat 2 08-11-2004 03:29 PM
httpd as a service joshf Linux - Software 5 07-10-2003 08:54 AM

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

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

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