Project

General

Profile

Some timeout questions

Added by dinkan almost 11 years ago

Hi,

I am porting my webserver from Hiawatha to Lighty
I have 3 questions regarding the same, please help
I have this TimeForRequest configuration option on Hiawatha
TimeForRequest = 5, 30 means; after a successful connection is established with a client; Hiawatha will timeout & close the connection if the first http/s request is NOT arrived in 3 seconds. The timeout for following requests is 30 seconds.
How do I achieve the same on Lighty?

In Lighty what does the following parameters mean. Please explain, I didn't understand the complete meaning from the one-liner in the documentation
a) server.max-read-idle = 60(max time for the client to place data in socket for server??)
b) server.max-write-idle = 360(max time for the client to read from socket??)

How do I configure the timeout for the backend FCGI application?
In hiawatha, there is an option to specify the timeout for fcgi application to respond.
If the FCGI app request times out, Hiawatha returns server error to the client.
BTW I start the fcgi app with cgi-fcgi program, not started by Lighttpd.

Please reply ASAP.

Thanks


Replies (3)

RE: Some timeout questions - Added by dinkan almost 11 years ago

Hi,

I figured out some of the answers, still got two more questions.
Please help.
1) What is difference between a)server.max-keep-alive-idle & b)server.max-read-idle ?
Is the max-keep-alive-idle for HTTP 1.1 & max-read-idle for HTTP 1.0?

2) How do I configure the timeout for the backend FCGI application?
if the FCGI application didn't respond, how could I timeout & send internal server error to client?

RE: Some timeout questions - Added by carpii over 10 years ago

1) Its documented here
http://redmine.lighttpd.net/projects/lighttpd/wiki/Docs_ConfigurationOptions

max-read-idle applies to non-keep alive connections, and specifies how long lighty should wait before dropping the connection, if there has been no activity read from client

2) As far as I know, once accepted, lighty will wait indefinitely until the fcgi backend responds
If the fcgi backend is overloaded and cannot handle the request, lighty will return an HTTP 500

If you want to set a maximum time limit for how long your fcgi should run, you can normally do this in the fcgi client language (PHP or whatever)

RE: Some timeout questions - Added by carpii over 10 years ago

Update: it may return an HTTP 504 rather then 500 when backend is overloaded. I haven't tested but seems more likely now I think about it

    (1-3/3)