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

Go Back   LiteSpeed Support Forums > LiteSpeed Web Server > Install/Configuration > [solved] Connection Timeout and php

Reply
 
Thread Tools Display Modes
  #1  
Old 11-23-2012, 02:16 AM
bobykus bobykus is offline
Senior Member
 
Join Date: Sep 2012
Posts: 64
Default [solved] Connection Timeout and php

Hello,

It is recommended to set "Connection Timeout" to 30 or so to prevent DDoS.
On the other hand we have a php scripts which execution can takes lets say
5 min (joomla theme install or update etc). How to distinguish between http connection timeout and lsapi apps output timeout then? I tried to set

Connection Timeout 30

and

Connection Keepalive Timeout 320


for LiteSpeed API App Definition

but connection to lsphp dropping within this 30 sec.


BTW, is there any way to set timeout per External App?

Last edited by NiteWave; 11-27-2012 at 05:36 PM..
Reply With Quote
  #2  
Old 11-23-2012, 10:28 AM
webizen webizen is offline
LiteSpeed Staff
 
Join Date: Oct 2010
Posts: 2,337
if your external app (LSPHP5) takes a long time to complete, you should extend "Connection Timeout" so that connection with external app does not get closed (due to inactivity) before ext app completes.

You need to balance between get the work done and prevent DDoS (there are other ways to defend DDoS in LSWS).
Reply With Quote
  #3  
Old 11-25-2012, 01:49 PM
bobykus bobykus is offline
Senior Member
 
Join Date: Sep 2012
Posts: 64
Oh yeah?
So no setting per php? What if I need one long and one short gun/php?
And... Connection Timeout means Tuning > Connection Timeout?
What is External App > ... > Connection Keepalive Timeout then?
What is for? How this two cooperate?
Reply With Quote
  #4  
Old 11-26-2012, 05:03 PM
webizen webizen is offline
LiteSpeed Staff
 
Join Date: Oct 2010
Posts: 2,337
Connection Timeout in Tuning indicates how long LSWS will keep the connection with end user when idel. If no response from external app (given LSWS keeps connection with LSPHP) within that period, connection with user will be closed.

The timeout for LSWS connect with external app (like LSPHP) is Initial Request Timeout (secs) and Retry Timeout (secs) in External App.

Here is a reference to run php without timeout:

http://www.litespeedtech.com/support...ithout_timeout

Connection Keepalive Timeout is for persistent connection which is only for FastCGI external app not for LSPHP.
Reply With Quote
  #5  
Old 11-27-2012, 02:41 AM
bobykus bobykus is offline
Senior Member
 
Join Date: Sep 2012
Posts: 64
Cool, thank you!
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


All times are GMT -7. The time now is 04:42 AM.



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