server.write_timeout

0 views
Skip to first unread message

albertv

unread,
Jul 10, 2006, 8:44:13 AM7/10/06
to cherrypy-devel
Hi,

I've added a config option that sets the socket's timeout. This bit me
when users tried to download 2-20MB files on our campus network: IE
sometimes paused for more than the default timeout of 10 seconds. The
server then closes the connection, and IE just rolls over and saves
what it has downloaded up to that point. The downloaded file is then
incomplete.

Setting the timeout to 60 seconds solved the problem.

This patch is against https://svn.cherrypy.org/trunk


Index: cherrypy/_cpwsgi.py
===================================================================
--- cherrypy/_cpwsgi.py (revision 1193)
+++ cherrypy/_cpwsgi.py (working copy)
@@ -212,5 +212,6 @@
conf('server.thread_pool'),
conf('server.socket_host'),
request_queue_size =
conf('server.socket_queue_size'),
+ timeout = conf('server.write_timeout'),
)

Index: cherrypy/config.py
===================================================================
--- cherrypy/config.py (revision 1193)
+++ cherrypy/config.py (working copy)
@@ -54,6 +54,7 @@
'server.protocol_version': 'HTTP/1.0',
'server.reverse_dns': False,
'server.thread_pool': 10,
+ 'server.write_timeout': 10,
'log_to_screen': True,
'log_file': _os.path.join(_os.getcwd(),_os.path.dirname(__file__),
"error.log"),


(I hope this the correct place to post this?)

--
Albert Visagie

Reply all
Reply to author
Forward
0 new messages