HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials

HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials (http://www.howtoforge.com/forums/index.php)
-   Installation/Configuration (http://www.howtoforge.com/forums/forumdisplay.php?f=16)
-   -   Server randomly not reachable. Can't detect the problem (http://www.howtoforge.com/forums/showthread.php?t=11074)

jobediah 3rd March 2007 15:19

Server randomly not reachable. Can't detect the problem
 
Hi there,

we run ISPConfig on Debian to manage our webserver with several virtual hosts. Everythings running fine, but the webserver suddenly isn't reachable any more. Login to ISPConfig or Webmail (on Port 81) still works fine. From the command line I can't see any problems. No heavy load, apache running normal, tcpdump shows normal connections.
After doing a /etc/init.d/apache2 restart the webserver is accesible via web again immediately. I don't even have to push reload in browser, the established connections is being finished at this moment.
The Firewall works fine, disabling doesn't fix the problem. There is enough space on the servers hds. The problem doesn't appear consistently, but randomly.

Does somebody have an idea whats going wrong?

Regards
Jobediah

martinfst 3rd March 2007 16:10

is there an error in /var/log/apache2/error.log?

jobediah 3rd March 2007 19:21

Not really, only things like "File does not exist: ".
When starting Apache it logs "server reached MaxClients setting, consider raising the MaxClients setting". I already tried to raise this setting, but the message doesn't disappear. But it also doesn't appear when not being reachable.

What would you advise for MaxClients Setting?

See my apache.conf:
<IfModule prefork.c>
StartServers 5
MinSpareServers 5
MaxSpareServers 10
MaxClients 20
MaxRequestsPerChild 0
</IfModule>

# pthread MPM
# StartServers ......... initial number of server processes to start
# MaxClients ........... maximum number of server processes allowed to start
# MinSpareThreads ...... minimum number of worker threads which are kept spare
# MaxSpareThreads ...... maximum number of worker threads which are kept spare
# ThreadsPerChild ...... constant number of worker threads in each server process
# MaxRequestsPerChild .. maximum number of requests a server process serves
<IfModule worker.c>
StartServers 5
MaxClients 250
MinSpareThreads 25
MaxSpareThreads 75
ThreadsPerChild 25
MaxRequestsPerChild 0
</IfModule>

Regards,
Jobediah

VolkerSt 3rd March 2007 20:52

I have the same Problem here. MONIT restarts the Server, though, but it is not reachable for a minute. Where do i adjust the MaxClients for testing? /etc/apache2/http.conf will be overwritten by ISPConfig?

Regards
Volker

jobediah 3rd March 2007 23:18

Tried raising MaxClients Setting up to 100.. Lets see tomorrow if this helps.

Interesting Links about MaxClients:
http://www.howtoforge.com/forums/sho...ght=MaxClients
http://modperlbook.org/html/ch11_01....-CHP-11-SECT-1

rayman 4th March 2007 00:24

max clients raise it
 
if my memory serves me correctly there is a not on the ispconfig website that states you need to raise you max clients..

but if you think about it it makes sense any way because as you start putting your sites on the web search engines etc start looking at it and if 10 engines all look at your 7 sites that atleast 70 clients straight away and if they use multiply robots (as some do) to view your pages quickly that could double in seconds for every page or link you have..etc etc.

when you reach your max you can't log in try allso looking up about the keep alive settings this to could help release clients instead of keeping clients active while some one goes and makes a cupper before changing pages..like i just did sorry

VolkerSt 4th March 2007 11:16

Hi!

Is it possible to show the MaxClients in Log to check? I dont want to bind to much ressources to the Apache. My Server has 2 Gig RAM...

Regards
Volker

rayman 4th March 2007 13:07

max clients
 
I'm not sure what you mean but you could check in your webalizer logs to see what sort of visitors you get and the apache logs should give you a more detailed account of whats going on and who's accessing and when but with 2gb of ram you should have no problems setting max clients to over 150 as long as your proccessor is up to the job my server is a lowly 333mhz cyrex m11 with only 128mb ram and it runs 2 websites with joomla and 1 which is just multiple htm pages and i don't have any problems with max clients at 100

but as i said before 1 client doesn't mean 1 visitor 1 visitor could use 5 clients or more if they leave pages open etc.

the best way is to up the number of clients and see what happens

jobediah 4th March 2007 13:58

How can I limit the time a client connection lasts respectively is kept open?

falko 4th March 2007 14:46

Take a look at the KeepAliveTimeout setting. I use
Code:

KeepAliveTimeout 4
Also take a look here: http://www.howtoforge.com/configurin...um_performance

And maybe you should set up monit on your server. It detects if a service (such as Apache) isn't running or reacting anymore and restarts it: http://www.howtoforge.com/server_monitoring_monit_munin


All times are GMT +2. The time now is 16:26.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.