I'm a bad boy and still using the Rocket server that comes with web2py. Today I ran into an interesting case. My client code sends a dump file to the server using a POST command. On linux systems, this completes in a reasonable amount of time, gets the result (json string), and both sides are happy. On several Windows systems, the client reports all done, and is happy, but the server logs don't have anything and the file doesn't show up. [tick tick tick ... time passes] Oh, yes there is something! Everything now looks good, except that web2py.log has this from Rocket:
2016-06-16 22:10:34,846 - Rocket.Errors.Thread-5 - ERROR - Unhandled Error when serving connection:
Traceback (most recent call last):
File "/home/ec2-user/web2py/web2py-2.14.6/gluon/rocket.py", line 1337, in run
self.run_app(conn)
File "/home/ec2-user/web2py/web2py-2.14.6/gluon/rocket.py", line 1851, in run_app
self.write(data, sections)
File "/home/ec2-user/web2py/web2py-2.14.6/gluon/rocket.py", line 1766, in write
self.send_headers(data, sections)
File "/home/ec2-user/web2py/web2py-2.14.6/gluon/rocket.py", line 1750, in send_headers
self.conn.sendall(b(header_data))
File "/usr/lib64/python2.7/socket.py", line 228, in meth
return getattr(self._sock,name)(*args)
error: [Errno 32] Broken pipe
Timeout seems to be on the order of an hour. Linux client code uses libcurl, and Windows client code uses Winsock.
The above clip is from web2py-2.14.6 running on an AWS server, from the zip file which has Rocket 1.2.6.
Is this an issue with Rocket, or with Winsock, or each playing to the other's weakness? When I finally move to nginx, will these errors go away?
/dps