Projet

Général

Profil

Demande #12270

Mis à jour par Scrum Master il y a plus de 8 ans

Des tracebacks apparaissent si on recharge la page dans gen_config.

Lorsque je retélécharge une page "not modified" avec cette commande :

<pre>
curl 'http://127.0.0.1:5000/genconfig/static/css/bootstrap.css' -H 'Accept-Encoding: gzip, deflate, sdch' -H 'Accept-Language: fr-FR,fr;q=0.8,en-US;q=0.6,en;q=0.4' -H 'User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Ubuntu Chromium/43.0.2357.81 Chrome/43.0.2357.81 Safari/537.36' -H 'Accept: text/css,*/*;q=0.1' -H 'Cache-Control: max-age=0' -H 'If-None-Match: "flask-1433427619.0-145229-1499665778"' -H 'Connection: keep-alive' -H 'If-Modified-Since: Thu, 04 Jun 2015 14:20:19 GMT' -H 'Referer: http://127.0.0.1:5000/genconfig/?application' --compressed
</pre>

J'ai un traceback dans les logs :

<pre>
==> /var/log/eoleflask/gunicorn-access.log <==
"127.0.0.1 - - [16/Jun/2015:11:39:00] "GET /genconfig/static/css/bootstrap.css HTTP/1.1" 304 - "http://127.0.0.1:5000/genconfig/?application" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Ubuntu Chromium/43.0.2357.81 Chrome/43.0.2357.81 Safari/537.36"

==> /var/log/eoleflask/gunicorn-error.log <==
2015-06-16 11:39:00 [5565] [ERROR] Socket error processing request.
Traceback (most recent call last):
File "/usr/lib/python2.7/dist-packages/gunicorn/workers/async.py", line 42, in handle
req = six.next(parser)
File "/usr/lib/python2.7/dist-packages/gunicorn/http/parser.py", line 39, in __next__
self.mesg = self.mesg_class(self.cfg, self.unreader, self.req_count)
File "/usr/lib/python2.7/dist-packages/gunicorn/http/message.py", line 152, in __init__
super(Request, self).__init__(cfg, unreader)
File "/usr/lib/python2.7/dist-packages/gunicorn/http/message.py", line 49, in __init__
unused = self.parse(self.unreader)
File "/usr/lib/python2.7/dist-packages/gunicorn/http/message.py", line 164, in parse
self.get_data(unreader, buf, stop=True)
File "/usr/lib/python2.7/dist-packages/gunicorn/http/message.py", line 155, in get_data
data = unreader.read()
File "/usr/lib/python2.7/dist-packages/gunicorn/http/unreader.py", line 38, in read
d = self.chunk()
File "/usr/lib/python2.7/dist-packages/gunicorn/http/unreader.py", line 65, in chunk
return self.sock.recv(self.mxchunk)
File "/usr/lib/python2.7/dist-packages/eventlet/greenio.py", line 251, in recv
return fd.recv(buflen, flags)
File "/usr/lib/python2.7/socket.py", line 170, in _dummy
raise error(EBADF, 'Bad file descriptor')
error: [Errno 9] Bad file descriptor
</pre> <pre>

La solution semble être dans le correctif suivant : https://github.com/benoitc/gunicorn/commit/0e4d9f0378fa5272842967b5cf47dab86f6f70f8

Retour