Error 408 Request Timed out on 1 site only ?

Discussion in 'Install/Configuration' started by eva2000, Dec 7, 2004.

  1. eva2000

    eva2000 Well-Known Member

    My vBulletin forum is on a litespeed web server powered server which also hosts forums.

    Problem is for the past 2-4 days I haven't been able to load my forums or site via domain or directly via IP address. I see the browser status bar "waiting for" but if I leave it long enough like this, the eventually the error message I get is from litespeed web server is as follows:

    Where do I increase this connection timeout value ? Or more importantly why would I only now experience this request timeout when the site has been fine before ?


    Last edited: Jan 28, 2011
  2. mistwang

    mistwang LiteSpeed Staff

    Welcome, George! :wink:

    Sorry about the downtime.
    It looks like a PHP problem from within lsws admin interface. 20 PHP Fast CGI instances are allocated for, normally, only 2-3 instances are used concurrently, but by the time I logon, all 20 PHP processes were hanging there, won't process any new requests, eventually the HTTP connection will be timed out by lsws.

    I happen have the admin login on, so I restarted lsws from the web admin interface, it is ok now.

    Really need to logon that box and check those hanging PHP processes.

    I will PM Alex about this, see if we can figure something out.

    Best Regards,
  3. mistwang

    mistwang LiteSpeed Staff

    Hi George,

    After intensive investigation on a server with similiar symptom (hanging PHP FastCGI processes), I think it is the fault of MySQL persistent connection in PHP, for more information please refer PHP documentation on, section about persistent MySQL database connection.

    I had informed Alex about the PHP configuration change.

    Best Regards,
  4. xing

    xing LiteSpeed Staff

    My two cents. If it is indeed mysql persistence problem, and you decide to disable them, use the following to get the most out of mysql performance.

    Configure thread_cache within my.cnf to be just high enough so that threads_created stat line does not increase. You'll have to monitor the mysql server during peak hours to see which value is best.

    If you have the above variable set correctly, non-persistent mysql connection will be as fast from php , espeically if using sockets, as compared to persistent ones.

    For me personally, using enabling mysql persistence within php had always caused severe scaling problems for me in the past.
  5. eva2000

    eva2000 Well-Known Member

    thanks George :)

    i checked and my persistent connections in vB is disabled.

    but now having another problem since updating to PHP 4.3.10 on this server

    right now not properly parsing some PHP/MySQL stuff and intermittently the same problem is on as well as my own forums ?

    Also the documentation is pretty lite and trying to find out what the virtual host -> external app differences are between what and have set or not set in them ?
    Last edited: Jan 28, 2011
  6. mistwang

    mistwang LiteSpeed Staff

    You are welcome. :)

    It should be a PHP problem, either caused by changes in 4.3.10 or some parameters in php.ini need to be tuned. The prebuilt PHP binary is configured with '--enable-magic-quotes' option, not sure it will affect any thing.
    Havn't heard any complaint from Alex yet. :)

    The PHP external app configurations for and are almost identical, they share the same PHP binary and php.ini, only difference is the maximum number of concurrent connections, 20 for and 50 for
    So and should behave exactly the same for the same PHP code. :)
  7. eva2000

    eva2000 Well-Known Member

    okay seems to be working now.. i commented out in lsws's php.ini PHPA and Ioncube encoder and all works including my forum's /admincp panel

    btw, do .htaccess work with lsws ?

    there's a worm thing going around and the fix is this .htaccess entry

    but not sure if it will work with lsws ?

  8. mistwang

    mistwang LiteSpeed Staff

    There is a new ioncube loader for php 4.3.10
    disboards needs ioncube loader for rating stuff.

    LiteSpeed has .htaccess, but not all Apache directives are supported right now, and .htaccess is not very efficient. Please use rewrite rules to block those requests, like

    RewriteCond   %{HTTP_USER_AGENT}    .*lwp.*  [NC]
    RewriteRule     ^/                                               [F]
    Just add above rules under "Rewrite" tab for

    There is a bug in 2.0RC4 that "reload", "restart" links stop working if a "reload" had been performed from the web admin interface. So you need to restart lsws from command line after the configuration change. There is no service interruption during the restart, so please always use "restart" from the web interface for now. :)
  9. eva2000

    eva2000 Well-Known Member

    1. how do you use lsws restart from command line ?
    2. seems my forums still have issues in /admincp but doesn't after readding ioncube/PHPA..

    i noticed i'm using different PHP version now 4.3.8 ??

    scratches head... seems it's running Apache 1.3.31 now hmmm
  10. mistwang

    mistwang LiteSpeed Staff

    You need to find out where lsws is installed to, then use
    bin/lswsctrl restart
    to restart it.

    Unless code is different, it should behave the same.

    Maybe Alex is working on the server, PM him. ;-)

Share This Page