Rocket server and Windows POST

75 views
Skip to first unread message

Dave S

unread,
Jun 16, 2016, 7:36:29 PM6/16/16
to web2py-users
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

Niphlod

unread,
Jun 17, 2016, 10:34:18 AM6/17/16
to web2py-users
how can it be a rocket issue when the variable is the client and not the server ?

Dave S

unread,
Jun 17, 2016, 5:25:30 PM6/17/16
to web2py-users
On Friday, June 17, 2016 at 7:34:18 AM UTC-7, Niphlod wrote:
how can it be a rocket issue when the variable is the client and not the server ?

By not handling a common error condition?  By setting the timeout too long?    Not requiring a keep-alive (aka heartbeat) on an open-but-quiet connection?

I haven't tried running a trace from either end, so I don't know what is happening with the handshakes other than that the connection gets established, and  a long time after the client is done, we get the above.

/dps

 

Niphlod

unread,
Jun 20, 2016, 5:24:49 AM6/20/16
to web2py-users
IMHO the problem is winsock.

Dave S

unread,
Jun 20, 2016, 2:13:53 PM6/20/16
to web2py-users


On Monday, June 20, 2016 at 2:24:49 AM UTC-7, Niphlod wrote:
IMHO the problem is winsock.

I wouldn't be surprised if it was, but am I the only one around here with a winsock client?  Do IE users have trouble with POSTs?

/dps
 

Niphlod

unread,
Jun 20, 2016, 3:19:58 PM6/20/16
to web2py-users
an hour long ? never had the necessity.... if instead we're talking about 5-10 minutes, not at all.

Dave S

unread,
Jun 20, 2016, 4:15:41 PM6/20/16
to web2py-users


On Monday, June 20, 2016 at 12:19:58 PM UTC-7, Niphlod wrote:
an hour long ? never had the necessity.... if instead we're talking about 5-10 minutes, not at all.

To be clear, the transfer takes about 1 minute; the timeout takes over an hour.

/dps
 
Reply all
Reply to author
Forward
0 new messages