[solved] 408 Request Time-out

Discussion in 'PHP' started by jeckdenial, Feb 13, 2011.

  1. jeckdenial

    jeckdenial Member

    Hello there,

    I am using Litespeed server Current Version: 4.0.19 with my CENTOS 5.5 x86_64 till now all was working well with my PHP ver 5.3.2

    But since 2 days one of my website just keep loading and end with 408 Request Time-out.

    While my other website hosted on same server works file.

    I am not very familiar with Litespeed and this is bringing me a lot of lost with website.

    I thought there should be some issue with PHP so i switch to apache and website is up again. Then i upgrade PHP to different version then i switch back to Litespeed and the same problem was there.

    Can you please let me know where the things are going wrong?

    Last edited by a moderator: Feb 13, 2011
  2. NiteWave

    NiteWave Administrator

    what's the setting of
    admin console->Server->Tuning->Connection Timeout (secs)?
  3. jeckdenial

    jeckdenial Member

    Hello NiteWave,

    Thanx for reply.

    Thats is set to 60 sec.

  4. NiteWave

    NiteWave Administrator

    it's too short. that means if a php script running over 60 seconds, lsws may think it's hanging and kill the php process, and issue 408 time out error.

    please check if that php script run for a long time?

    if it's the case, increase the time out.
  5. jeckdenial

    jeckdenial Member

    i can understand that but till now all was set to fine and my website was even loading in just about 2-3 sec.

    I havnt changed any value in lsws or even in sever. This happened since 2 days.

    so if i increase this time that mean my website still will take more than 60 sec to load. that what i am not expecting from lsws.


    I have increased to 120 sec. i will give you report on how long php is running
  6. NiteWave

    NiteWave Administrator

    no. if php scripts only need 2-3 seconds to complete, increasing timeout won't affect these scripts at all. only affect those scripts which need above 60 seconds to complete.

    can you figure out which url cause 408 time out error ? or many URLs ?
  7. jeckdenial

    jeckdenial Member

    yes php wait for that long and again giving same error even if i have make that to 120.

    One thing i have found that .html works well if i make new page with html that is no problem.

    While my whole website is on php. From index page to even single php page same thing happens.
  8. NiteWave

    NiteWave Administrator

    strange. how about phpinfo() page? 408 error as well ?
  9. jeckdenial

    jeckdenial Member

    I make test.php for phpinfo(). you right the same with that as well.


    After long like 7-8 min the page appear. but that still load like hell.
    Last edited: Feb 13, 2011
  10. NiteWave

    NiteWave Administrator

    maybe rewrite cause a infinite loop or loop in a mod_security rule?

    can disable all mod_security rules temporarily if it's the latter case.

    for former case, in docroot .htaccess, put
    rewriteengine off
    in first line.

    then access test.php again.
  11. jeckdenial

    jeckdenial Member

    yes thats working after doing so.

    so what you suggest me to do now.
  12. NiteWave

    NiteWave Administrator

    which is the cause, rewrite or mod_security?
  13. jeckdenial

    jeckdenial Member

    when i change rewrite to off then it shows page.
  14. NiteWave

    NiteWave Administrator

    paste the .htaccess here. any change made in recent 2-3 days ?
  15. jeckdenial

    jeckdenial Member

    I am on wordpress and i guess i did update version to new one also wp-super cache was updated which include some rewrite rules may cause the .htaccess problem. so temporary i have removed plugin to see any difference.

    RewriteEngine On
    RewriteBase /
    RewriteRule ^index\.php$ - [L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]

    i guess i found the problem.

    I have problem with my theme. As i changed that to different theme and it work perfect.

    thanx a lot for your help to find the problem.
    Last edited: Feb 13, 2011

Share This Page