gunicorn、flask error: [ERROR] Socket error processing request, The detailed error message is as follows.
Traceback (most recent call last):
File “/usr/local/lib/python3.6/site-packages/gunicorn/workers/base_async.py”, line 65, in handle
util.reraise(*sys.exc_info())
File “/usr/local/lib/python3.6/site-packages/gunicorn/util.py”, line 625, in reraise
raise value
File “/usr/local/lib/python3.6/site-packages/gunicorn/workers/base_async.py”, line 48, in handle
req = next(parser)
File “/usr/local/lib/python3.6/site-packages/gunicorn/http/parser.py”, line 41, in __next__
self.mesg = self.mesg_class(self.cfg, self.unreader, self.req_count)
File “/usr/local/lib/python3.6/site-packages/gunicorn/http/message.py”, line 186, in __init__
super().__init__(cfg, unreader)
File “/usr/local/lib/python3.6/site-packages/gunicorn/http/message.py”, line 53, in __init__
unused = self.parse(self.unreader)
File “/usr/local/lib/python3.6/site-packages/gunicorn/http/message.py”, line 198, in parse
self.get_data(unreader, buf, stop=True)
File “/usr/local/lib/python3.6/site-packages/gunicorn/http/message.py”, line 189, in get_data
data = unreader.read()
File “/usr/local/lib/python3.6/site-packages/gunicorn/http/unreader.py”, line 37, in read
d = self.chunk()
File “/usr/local/lib/python3.6/site-packages/gunicorn/http/unreader.py”, line 64, in chunk
return self.sock.recv(self.mxchunk)
File “/usr/local/lib64/python3.6/site-packages/gevent/_ssl3.py”, line 555, in recv
return self.read(buflen)
File “/usr/local/lib64/python3.6/site-packages/gevent/_ssl3.py”, line 386, in read
return self._sslobj.read(nbytes or 1024)
File “/usr/lib64/python3.6/ssl.py”, line 589, in read
v = self._sslobj.read(len)
OSError: [Errno 0] Error
Traceback (most recent call last):
File “/usr/local/lib/python3.6/site-packages/gunicorn/workers/base_async.py”, line 65, in handle
util.reraise(*sys.exc_info())
File “/usr/local/lib/python3.6/site-packages/gunicorn/util.py”, line 625, in reraise
raise value
File “/usr/local/lib/python3.6/site-packages/gunicorn/workers/base_async.py”, line 48, in handle
req = next(parser)
File “/usr/local/lib/python3.6/site-packages/gunicorn/http/parser.py”, line 41, in __next__
self.mesg = self.mesg_class(self.cfg, self.unreader, self.req_count)
File “/usr/local/lib/python3.6/site-packages/gunicorn/http/message.py”, line 186, in __init__
super().__init__(cfg, unreader)
File “/usr/local/lib/python3.6/site-packages/gunicorn/http/message.py”, line 53, in __init__
unused = self.parse(self.unreader)
File “/usr/local/lib/python3.6/site-packages/gunicorn/http/message.py”, line 198, in parse
self.get_data(unreader, buf, stop=True)
File “/usr/local/lib/python3.6/site-packages/gunicorn/http/message.py”, line 189, in get_data
data = unreader.read()
File “/usr/local/lib/python3.6/site-packages/gunicorn/http/unreader.py”, line 37, in read
d = self.chunk()
File “/usr/local/lib/python3.6/site-packages/gunicorn/http/unreader.py”, line 64, in chunk
return self.sock.recv(self.mxchunk)
File “/usr/local/lib64/python3.6/site-packages/gevent/_ssl3.py”, line 555, in recv
return self.read(buflen)
File “/usr/local/lib64/python3.6/site-packages/gevent/_ssl3.py”, line 386, in read
return self._sslobj.read(nbytes or 1024)
File “/usr/lib64/python3.6/ssl.py”, line 589, in read
v = self._sslobj.read(len)
OSError: [Errno 0] Error
Solution.
gunicorn cannot support both http and https requests
I have changed from gunicorn to uwsgi and no more headaches!!!
Link:
https://stackoverflow.com/questions/51619559/socket-error-processing-request-with-flask-gunicorn-docker-and-azure
gunicorn cannot support both http and https requests
I have changed from gunicorn to uwsgi and no more headaches!!!
Link:
https://stackoverflow.com/questions/51619559/socket-error-processing-request-with-flask-gunicorn-docker-and-azure
Read More:
- Crawler overtime error socket.timeout: timed out/NameError: name ‘socket‘ is not defined
- Gunicorn timeout error: [1] [critical] worker timeout [How to Solve]
- [Solved] Python2 Flask startup error: [Errno 10053]
- [Solved] Vite build & Flask Error: Failed to load module script. Strict MIME type checking is enforced
- [Solved] Request.url is not modifiable, use Request.replace() instead
- Flask Database Migration Error: ERROR [flask_migrate] Error: Can‘t locate revision identified by ‘a1c25fe0fc0e‘
- [Solved] FLask Error: AttributeError: ‘Blueprint‘ object has no attribute ‘register_blueprint‘
- [Solved] flask db migrate execute error: ERROR [flask_migrate] Error: Can‘t locate revision identified by ‘8d1ad59dc71a‘
- [Solved] Flask Application Context Error: RuntimeError: Working outside of application context.
- [Solved] C error: expected 1 fields in line 3, saw 2 processing method
- [Modified] AttributeError: ‘socket‘ object has no attribute ‘ioctl‘ python linux
- [Solved] Django backend processing Base64 file upload error
- python: File Processing and Input and Output
- [Solved] Python Error: socket.gaierror : [errno 11004] getaddrinfo failed error
- [Solved] Odrive gui Error: Do not use the development server in a productioun and supported version of the Socket
- [Solved] ssl_client_socket_impl.cc handshake failed (Same Codes in Different Environments)
- Pyinstaller Error: [ImportError]: DLL load failed while importing _socket: Parameter error
- [Solved] Error starting proxy server: oserror (10013), “an attempt was made to access the socket in a way that the access permission is not allowed.”, None, 10013, None)
- Parallel processing in Python (Pool.map(), Pool.starmap(), Pool.apply ())
- [Solved] Forbidden (403) CSRF verification failed. Request aborted.