Server randomly not reachable. Can't detect the problem

Discussion in 'Installation/Configuration' started by jobediah, Mar 3, 2007.

  1. jobediah

    jobediah New Member

    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
     
  2. martinfst

    martinfst ISPConfig Developer ISPConfig Developer

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

    jobediah New Member

    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
     
    Last edited: Mar 3, 2007
  4. VolkerSt

    VolkerSt New Member

    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
     
  5. jobediah

    jobediah New Member

  6. rayman

    rayman New Member

    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
     
  7. VolkerSt

    VolkerSt New Member

    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
     
  8. rayman

    rayman New Member

    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
     
  9. jobediah

    jobediah New Member

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

    falko Super Moderator ISPConfig Developer

  11. VolkerSt

    VolkerSt New Member

    I use Monit, but it takes 1 Minute to restart the Apache...

    Well, i set the Maxclient to 150 and now it seems to work fine. No Restarts, no Timeouts... Maybe its ok now.

    Regards
    Volker
     
  12. rayman

    rayman New Member

    well done

    see we said try it didn't we ,,

    but as both I and Falko suggested it would be a good idea to also check your keep alive settings as this would give you better performance if set ,,as I stated before my server is only a 333 cyrex with 128mb ram and although at the moment I'm doing some house keeping on it when its in full swing my friends say it gives a good response time and downloading from it is quicker than some mirror sites they've used..

    so with all the extra memory yours has you could probebly load it with sites and services and still get good results with the right settings..

    I personally would feel the machine was under utilized if it were mine....lol
     
  13. VolkerSt

    VolkerSt New Member

    On that Server are more than 50 Sites... Some of them with 1500 unique Visitors / Day...

    It really seems to run now... Thanks!

    Regards
    Volker
     

Share This Page