LiteSpeed Technologies
Download Download     Blog Blog     Wiki Wiki     Forum Forum     Store     Contact Contact    

Go Back   LiteSpeed Support Forums > LiteSpeed Web Server > Install/Configuration > Timeout Problem

Reply
 
Thread Tools Display Modes
  #1  
Old 11-03-2005, 10:36 AM
bkonia bkonia is offline
Member
 
Join Date: Sep 2005
Posts: 16
Default Timeout Problem

I'm having a problem with LSWS timing out on my server. It seems that the problem is triggered when a user executes a PHP script that exceeds the LSWS timeout limit. After the first timeout, subsequent requests to other PHP scripts time out even if they are very simple scripts.

I'm guessing that what's happening is that the first script is using up all the available PHP connections and/or processes, and when the timeout occurs, it's not releasing those connections, which means that subsequent PHP requests would be waiting indefinitely for a connection to become available.

There's probably some setting that will fix this, but I'm not sure what to do. I just tried setting my "Max Idle Time" to 30. Previously this was not set, but I don't know if this will make any difference. I also tried setting "Initial Request Timeout" to 60. This was also previously not set.

I'm using LSAPI with:

Instances = 1
PHP_LSAPI_CHILDREN=100

Would it possibly be better to get rid of the PHP_LSAPI_CHILDREN setting, and set Instances = 100?

I know I'm just shooting in the dark and would appreciate some suggestions...
Reply With Quote
  #2  
Old 11-03-2005, 11:46 AM
mistwang mistwang is offline
LiteSpeed Staff
 
Join Date: May 2003
Location: New Jersey
Posts: 7,590
You need to increase the "Initial request Timeout" to at least the time that the slowest script takes. "Connection Timeout" should be longer than the "Initial request timeout". And the slow script should be made faster if possible. :-)

Quote:
Would it possibly be better to get rid of the PHP_LSAPI_CHILDREN setting, and set Instances = 100?
yes, it probably do better when instances = 100 in your case, as php processes is directly managed by lshttpd, and whenever a request timed out, the PHP process handling the request will be terminated. Only drawback with this way, PHP processes can not share their opcode cache with each other, not a big deal in most cases.
Reply With Quote
  #3  
Old 12-20-2008, 12:00 PM
gmichels gmichels is offline
Member
 
Join Date: Dec 2008
Posts: 10
Sorry for resurrecting this old thread, but I'm having a somewhat similar issue. I have this php script that uses curl to open several http pages, so it takes a long time to run... sometimes it may take 2 hours to complete.

It was designed to be a background task, so no screen output, and there lies the problem. If I modify it so there is output echoed every few seconds on the browser, then the script run flawlessly, even if it takes two hours. However if I disable the screen output, the script will timeout after exactly 5 minutes (I checked by writing the output to a file).

I searched the forums and came across this topic, where it's said to increase the Initial Request Timeout, however mine is set to 60 seconds and the script timeouts after 300 seconds, so I don't think the problem will be solved by increasing this setting.

Any ideas where should I change any settings? Can I set a timeout of 0 for this particular script? I'm running v3.3.22 and PHP 5.2.6.

Thanks
Reply With Quote
Reply

Thread Tools
Display Modes

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 On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Request Timeout after 15 secs. slimak General 3 03-30-2007 11:09 AM
problem with php4 as fcgi both remote/local ts77 Install/Configuration 6 10-02-2006 04:46 PM
Problem running Gallery under LiteSpeed kchrist PHP 4 10-01-2006 02:53 PM
Ruby on Rails/FCGI problem eweaver Install/Configuration 1 12-05-2005 09:56 AM
Problem setting on more Fast CGI app in addition of PHP superbarre.com Install/Configuration 2 01-21-2005 09:24 AM


All times are GMT -7. The time now is 12:48 PM.



- Archive - Top
© Copyright 2003-2011 LiteSpeed Technologies, Inc. All rights reserved. Privacy Policy.