Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Cherokee: dev

Issue 1307 in cherokee: timeout setting doesn't work

 

 

Cherokee dev RSS feed   Index | Next | Previous | View Threaded


cherokee at googlecode

Nov 24, 2011, 10:12 AM

Post #1 of 12 (1394 views)
Permalink
Issue 1307 in cherokee: timeout setting doesn't work

Status: New
Owner: ----

New issue 1307 by ajmir...@gmail.com: timeout setting doesn't work
http://code.google.com/p/cherokee/issues/detail?id=1307

What steps will reproduce the problem?
1. Set timeout setting to 2 seconds via general > network settings >
timeout.
2. Access an item that takes longer than 2 seconds to generate. For example:
> cat index.php
<html><head></head><body><?php sleep(300); ?></body></html>

or when running uwsgi:
> cat timeout_app.py
import time
time.sleep(300)

What is the expected output? What do you see instead?

I expect that cherokee will terminate the interpreter (either fastcgi or
uwsgi) after 2 seconds. However, both are allowed to execute for ~15-17
seconds before cherokee responds with a 504 gateway timeout error.

What version of the product are you using? On what operating system?
version 1.2.101 on ubuntu 11.10

Please provide any additional information below.

This was discovered when trying to increase the timeout from the default of
15 to something larger and the timeout value not seeming to be respected.
Verified that cherokee.conf has a setting server!timeout = 2.


_______________________________________________
Cherokee-dev mailing list
Cherokee-dev [at] lists
http://lists.octality.com/listinfo/cherokee-dev


cherokee at googlecode

Nov 28, 2011, 1:33 PM

Post #2 of 12 (1355 views)
Permalink
Re: Issue 1307 in cherokee: timeout setting doesn't work [In reply to]

Comment #1 on issue 1307 by ste...@konink.de: timeout setting doesn't work
http://code.google.com/p/cherokee/issues/detail?id=1307

Cherokee will not terminate the interpreter, because unless you are using
CGI Cherokee just can't. Cherokee will terminate your client's network
connection.

_______________________________________________
Cherokee-dev mailing list
Cherokee-dev [at] lists
http://lists.octality.com/listinfo/cherokee-dev


cherokee at googlecode

Nov 28, 2011, 7:23 PM

Post #3 of 12 (1357 views)
Permalink
Re: Issue 1307 in cherokee: timeout setting doesn't work [In reply to]

Comment #2 on issue 1307 by and...@mirsky.net: timeout setting doesn't work
http://code.google.com/p/cherokee/issues/detail?id=1307

ah, ok. makes sense. but the server still doesn't seem to be terminating
the client's network connection within the appropriate time set in the
config file or through the admin webserver.

_______________________________________________
Cherokee-dev mailing list
Cherokee-dev [at] lists
http://lists.octality.com/listinfo/cherokee-dev


cherokee at googlecode

Mar 5, 2012, 6:57 PM

Post #4 of 12 (1248 views)
Permalink
Re: Issue 1307 in cherokee: timeout setting doesn't work [In reply to]

Comment #3 on issue 1307 by etienne....@gmail.com: timeout setting doesn't
work
http://code.google.com/p/cherokee/issues/detail?id=1307

I'm on version 1.2.101 on ubuntu 10.04 and I definitely have the same
problem: to whatever value I set the timeout, in the general tab or
specific to a vserver source, the timeout is always 15 seconds. The server
doesn't care of the settings. I'm over SSL.

_______________________________________________
Cherokee-dev mailing list
Cherokee-dev [at] lists
http://lists.octality.com/listinfo/cherokee-dev


cherokee at googlecode

May 7, 2012, 7:25 PM

Post #5 of 12 (1155 views)
Permalink
Re: Issue 1307 in cherokee: timeout setting doesn't work [In reply to]

Comment #4 on issue 1307 by lnu...@gmail.com: timeout setting doesn't work
http://code.google.com/p/cherokee/issues/detail?id=1307

I can confirm this error

_______________________________________________
Cherokee-dev mailing list
Cherokee-dev [at] lists
http://lists.octality.com/listinfo/cherokee-dev


cherokee at googlecode

May 7, 2012, 8:29 PM

Post #6 of 12 (1162 views)
Permalink
Re: Issue 1307 in cherokee: timeout setting doesn't work [In reply to]

Comment #5 on issue 1307 by da...@davidjb.com: timeout setting doesn't work
http://code.google.com/p/cherokee/issues/detail?id=1307

I can confirm this is happening for me on Cherokee 1.2.101 under RHEL 6.2,
using various information sources as the backend for Reverse Proxy handlers.

This bug does seem inconsistent as I've seen the timeout respected (afaict)
on SSL connections with different options.

It definitely does occur though.

_______________________________________________
Cherokee-dev mailing list
Cherokee-dev [at] lists
http://lists.octality.com/listinfo/cherokee-dev


cherokee at googlecode

Jun 14, 2012, 9:05 AM

Post #7 of 12 (1093 views)
Permalink
Re: Issue 1307 in cherokee: timeout setting doesn't work [In reply to]

Comment #6 on issue 1307 by 246...@gmail.com: timeout setting doesn't work
http://code.google.com/p/cherokee/issues/detail?id=1307

AFAICT the timeout is _not_ respected on SSL.


If you look in thread.c , the accept_new_connection() functions:
- Inside get_new_connection call you get the server timeout taken
- Then a bit later, if the connection is SSL, it replaces it by the
cryptor's timeout_handshake which is 15sec by default. (To allow set the
SSL handshake timeout I'd guess).
- The server timeout is never restored once the SSL handshake is down, so
the timeout is fixed to 15 sec ...

What you can do is set a timeout on the 'rule' and this will replace the
conn timeout once the request is parsed and dispatched.

_______________________________________________
Cherokee-dev mailing list
Cherokee-dev [at] lists
http://lists.octality.com/listinfo/cherokee-dev


cherokee at googlecode

Jun 15, 2012, 1:54 PM

Post #8 of 12 (1088 views)
Permalink
Re: Issue 1307 in cherokee: timeout setting doesn't work [In reply to]

Comment #7 on issue 1307 by 246...@gmail.com: timeout setting doesn't work
http://code.google.com/p/cherokee/issues/detail?id=1307

Here are two experimental patches to fix the timeout issues.

I didn't get a chance to test those myself, I will do so on Monday but if
you're brave enough, feel free to check if it fixes your issue.

Attachments:
0001-rule_list-Update-the-timeout-when-setting-per-rule-t.patch 987 bytes
0002-ssl-Restore-the-server-default-timeout_lapse-once-SS.patch 974 bytes

_______________________________________________
Cherokee-dev mailing list
Cherokee-dev [at] lists
http://lists.octality.com/listinfo/cherokee-dev


cherokee at googlecode

Jun 18, 2012, 1:25 AM

Post #9 of 12 (1079 views)
Permalink
Re: Issue 1307 in cherokee: timeout setting doesn't work [In reply to]

Comment #8 on issue 1307 by 246...@gmail.com: timeout setting doesn't work
http://code.google.com/p/cherokee/issues/detail?id=1307

I've just tested the two patches and they seem to perform as expected.

The server timeout is now properly used even for SSL. And if you override
it by a 'rule' timeout, it is taken into account every time reliably (and
not erratically like it was before).

I've deployed it to production and nothing bad happened :p

_______________________________________________
Cherokee-dev mailing list
Cherokee-dev [at] lists
http://lists.octality.com/listinfo/cherokee-dev


cherokee at googlecode

Jul 18, 2012, 9:49 PM

Post #10 of 12 (1018 views)
Permalink
Re: Issue 1307 in cherokee: timeout setting doesn't work [In reply to]

Comment #9 on issue 1307 by da...@davidjb.com: timeout setting doesn't work
http://code.google.com/p/cherokee/issues/detail?id=1307

I've tried these patches against the current GitHub master and the issue is
resolved. I've written QA tests to show this accordingly.

Pull request for the patches is here (with QA included):
https://github.com/cherokee/webserver/pull/24

Thanks for the patches!

_______________________________________________
Cherokee-dev mailing list
Cherokee-dev [at] lists
http://lists.octality.com/listinfo/cherokee-dev


cherokee at googlecode

Jul 19, 2012, 1:53 AM

Post #11 of 12 (1015 views)
Permalink
Re: Issue 1307 in cherokee: timeout setting doesn't work [In reply to]

Comment #10 on issue 1307 by ste...@konink.de: timeout setting doesn't work
http://code.google.com/p/cherokee/issues/detail?id=1307

Just submitted my Master Thesis :-) merging window of cool patches will
begin today :)

_______________________________________________
Cherokee-dev mailing list
Cherokee-dev [at] lists
http://lists.octality.com/listinfo/cherokee-dev


cherokee at googlecode

Jul 19, 2012, 12:59 PM

Post #12 of 12 (1019 views)
Permalink
Re: Issue 1307 in cherokee: timeout setting doesn't work [In reply to]

Updates:
Status: Fixed
Labels: Type-Defect Priority-High OpSys-All Component-Logic

Comment #11 on issue 1307 by ste...@konink.de: timeout setting doesn't work
http://code.google.com/p/cherokee/issues/detail?id=1307

Patch has been merged. Thanks very much. Next bug!

_______________________________________________
Cherokee-dev mailing list
Cherokee-dev [at] lists
http://lists.octality.com/listinfo/cherokee-dev

Cherokee dev RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.