-
Notifications
You must be signed in to change notification settings - Fork 936
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ssl error: SSL3_WRITE_PENDING #317
Comments
I have the same problem with the same versions. Happens primarily when using send/sendall to send a big chunk of data. |
Are you still able to reproduce this on a 1.1a version? |
I have the same problem with gevent 1.1rc1 |
Can you post your versions and a current traceback? |
Python 2.7.0 Traceback:
Actually I've fixed my problem. I had |
Agreed, I don't see a gevent library in that last traceback anywhere, only requests and pyopenssl, and pyopenssl is not monkey-patched or supported by gevent. Only the standard-library That said, gevent's ssl module doesn't explicitly handle this error either---because it's basically a programming error and a legitimate bug in either gevent or the calling application. (The bug could only be gevent's in the case of a monkey-patch call to In gevent's case, this was possible in 0.13.6 if the socket's timeout was 0 and |
Clean up SSL exceptions and add tests for #317 and SSL timeouts in general
This should be fixed, as far as I can determine (and minimally test). Please open a new issue if you can still produce it with master/1.1rc2 or later. |
Hello,
I'm using gevent-socketio to create websocket connections and to serve up static assets (html, css, js, etc).
Everything works fine, however if I try to reload the page very quickly, I get the error below.
Any help trying to isolate the problem would be appreciated.
Python 2.7.3
Gevent 0.13.8 (latest)
Gevent-socketio 0.3.6
x.x.x.x - - [2013-09-25 19:45:09] "GET /static/socket.io.js HTTP/1.1" 500 0 0.162437
Traceback (most recent call last):
File "/usr/lib/python2.7/site-packages/gevent/greenlet.py", line 390, in run
result = self._run(_self.args, *_self.kwargs)
File "/usr/lib/python2.7/site-packages/gevent/server.py", line 160, in wrap_socket_and_handle
return self.handle(ssl_socket, address)
File "build/bdist.linux-x86_64/egg/socketio/server.py", line 113, in handle
handler.handle()
File "/usr/lib/python2.7/site-packages/gevent/pywsgi.py", line 180, in handle
result = self.handle_one_request()
File "build/bdist.linux-x86_64/egg/socketio/handler.py", line 185, in handle_one_request
handleResult = super(SocketIOHandler, self).handle_one_request()
File "/usr/lib/python2.7/site-packages/gevent/pywsgi.py", line 314, in handle_one_request
self.handle_one_response()
File "build/bdist.linux-x86_64/egg/socketio/handler.py", line 96, in handle_one_response
return super(SocketIOHandler, self).handle_one_response()
File "/usr/lib/python2.7/site-packages/gevent/pywsgi.py", line 455, in handle_one_response
self.write(_INTERNAL_ERROR_BODY)
File "/usr/lib/python2.7/site-packages/gevent/pywsgi.py", line 373, in write
self.socket.sendall(msg)
File "/usr/lib/python2.7/site-packages/gevent/socket.py", line 509, in sendall
data_sent += self.send(_get_memory(data, data_sent), flags)
File "/usr/lib/python2.7/site-packages/gevent/ssl.py", line 188, in send
v = self._sslobj.write(data)
SSLError: [Errno 1] _ssl.c:1242: error:1409F07F:SSL routines:SSL3_WRITE_PENDING:bad write retry
<Greenlet at 0x6228af0: <bound method SocketIOServer.wrap_socket_and_handle of <SocketIOServer at 0x2049990 fileno=32 address=0.0.0.0:7000>>(<socket at 0x6711b50 fileno=-1>, ('x.x.x.x', 46504))> failed with SSLError
The text was updated successfully, but these errors were encountered: