puzzling stack trace

29 views
Skip to first unread message

Marco

unread,
May 26, 2015, 1:54:11 PM5/26/15
to pylons-...@googlegroups.com
All,

we got this stack trace from a pyramid app with exclog turned on:

[Mon May 25 05:40:15 2015] [error] [client 82.166.159.170] mod_wsgi (pid=32066): Exception occurred processing WSGI script /var/www/wsgi/omicia_webapp/production.wsgi.
[Mon May 25 05:40:15 2015] [error] [client 82.166.159.170] Traceback (most recent call last):
[Mon May 25 05:40:15 2015] [error] [client 82.166.159.170]   File "/var/www/sandboxen/omicia_webapp/lib/python2.7/site-packages/pyramid/router.py", line 242, in __call__
[Mon May 25 05:40:15 2015] [error] [client 82.166.159.170]     response = self.invoke_subrequest(request, use_tweens=True)
[Mon May 25 05:40:15 2015] [error] [client 82.166.159.170]   File "/var/www/sandboxen/omicia_webapp/lib/python2.7/site-packages/pyramid/router.py", line 217, in invoke_subrequest
[Mon May 25 05:40:15 2015] [error] [client 82.166.159.170]     response = handle_request(request)
[Mon May 25 05:40:15 2015] [error] [client 82.166.159.170]   File "/var/www/sandboxen/omicia_webapp/lib/python2.7/site-packages/pyramid/tweens.py", line 46, in excview_tween
[Mon May 25 05:40:15 2015] [error] [client 82.166.159.170]     response = view_callable(exc, request)
[Mon May 25 05:40:15 2015] [error] [client 82.166.159.170]   File "/var/www/sandboxen/omicia_webapp/lib/python2.7/site-packages/pyramid/config/views.py", line 385, in viewresult_to_response
[Mon May 25 05:40:15 2015] [error] [client 82.166.159.170]     result = view(context, request)
[Mon May 25 05:40:15 2015] [error] [client 82.166.159.170]   File "/var/www/sandboxen/omicia_webapp/lib/python2.7/site-packages/pyramid/tweens.py", line 21, in excview_tween
[Mon May 25 05:40:15 2015] [error] [client 82.166.159.170]     response = handler(request)
[Mon May 25 05:40:15 2015] [error] [client 82.166.159.170]   File "/var/www/sandboxen/omicia_webapp/lib/python2.7/site-packages/pyramid_tm-0.8-py2.7.egg/pyramid_tm/__init__.py", line 92, in tm_tween
[Mon May 25 05:40:15 2015] [error] [client 82.166.159.170]     reraise(*exc_info)
[Mon May 25 05:40:15 2015] [error] [client 82.166.159.170]   File "/var/www/sandboxen/omicia_webapp/lib/python2.7/site-packages/pyramid_tm-0.8-py2.7.egg/pyramid_tm/__init__.py", line 73, in tm_tween
[Mon May 25 05:40:15 2015] [error] [client 82.166.159.170]     response = handler(request)
[Mon May 25 05:40:15 2015] [error] [client 82.166.159.170]   File "/var/www/sandboxen/omicia_webapp/lib/python2.7/site-packages/pyramid_exclog-0.7-py2.7.egg/pyramid_exclog/__init__.py", line 115, in exclog_tween
[Mon May 25 05:40:15 2015] [error] [client 82.166.159.170]     _handle_error(request, getLogger, get_message)
[Mon May 25 05:40:15 2015] [error] [client 82.166.159.170]   File "/var/www/sandboxen/omicia_webapp/lib/python2.7/site-packages/pyramid_exclog-0.7-py2.7.egg/pyramid_exclog/__init__.py", line 89, in _handle_error
[Mon May 25 05:40:15 2015] [error] [client 82.166.159.170]     message = get_message(request)
[Mon May 25 05:40:15 2015] [error] [client 82.166.159.170]   File "/var/www/sandboxen/omicia_webapp/lib/python2.7/site-packages/pyramid_exclog-0.7-py2.7.egg/pyramid_exclog/__init__.py", line 72, in _get_message
[Mon May 25 05:40:15 2015] [error] [client 82.166.159.170]     params = request.params
[Mon May 25 05:40:15 2015] [error] [client 82.166.159.170]   File "build/bdist.linux-x86_64/egg/webob/request.py", line 856, in params
[Mon May 25 05:40:15 2015] [error] [client 82.166.159.170]     params = NestedMultiDict(self.GET, self.POST)
[Mon May 25 05:40:15 2015] [error] [client 82.166.159.170]   File "build/bdist.linux-x86_64/egg/webob/request.py", line 806, in POST
[Mon May 25 05:40:15 2015] [error] [client 82.166.159.170]     keep_blank_values=True)
[Mon May 25 05:40:15 2015] [error] [client 82.166.159.170]   File "/opt/python2.7.2/lib/python2.7/cgi.py", line 508, in __init__
[Mon May 25 05:40:15 2015] [error] [client 82.166.159.170]     self.read_multi(environ, keep_blank_values, strict_parsing)
[Mon May 25 05:40:15 2015] [error] [client 82.166.159.170]   File "/opt/python2.7.2/lib/python2.7/cgi.py", line 632, in read_multi
[Mon May 25 05:40:15 2015] [error] [client 82.166.159.170]     environ, keep_blank_values, strict_parsing)
[Mon May 25 05:40:15 2015] [error] [client 82.166.159.170]   File "/opt/python2.7.2/lib/python2.7/cgi.py", line 510, in __init__
[Mon May 25 05:40:15 2015] [error] [client 82.166.159.170]     self.read_single()
[Mon May 25 05:40:15 2015] [error] [client 82.166.159.170]   File "/opt/python2.7.2/lib/python2.7/cgi.py", line 647, in read_single
[Mon May 25 05:40:15 2015] [error] [client 82.166.159.170]     self.read_lines()
[Mon May 25 05:40:15 2015] [error] [client 82.166.159.170]   File "/opt/python2.7.2/lib/python2.7/cgi.py", line 669, in read_lines
[Mon May 25 05:40:15 2015] [error] [client 82.166.159.170]     self.read_lines_to_outerboundary()
[Mon May 25 05:40:15 2015] [error] [client 82.166.159.170]   File "/opt/python2.7.2/lib/python2.7/cgi.py", line 697, in read_lines_to_outerboundary
[Mon May 25 05:40:15 2015] [error] [client 82.166.159.170]     line = self.fp.readline(1<<16)
[Mon May 25 05:40:15 2015] [error] [client 82.166.159.170]   File "build/bdist.linux-x86_64/egg/webob/request.py", line 1545, in readinto
[Mon May 25 05:40:15 2015] [error] [client 82.166.159.170]     data = self.file.read(sz0)
[Mon May 25 05:40:15 2015] [error] [client 82.166.159.170] IOError: request data read error
[Mon May 25 05:44:12 2015] [error] [client 82.166.159.170] (70007)The timeout specified has expired: mod_wsgi (pid=32085): Unable to get bucket brigade for request., referer:[redacted]

Does anybody know what may be causing it?
Thanks
Marco

Oliver

unread,
May 26, 2015, 2:36:59 PM5/26/15
to pylons-...@googlegroups.com
May be an interrupted file upload?
> --
> You received this message because you are subscribed to the Google Groups "pylons-discuss" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to
> pylons-discus...@googlegroups.com <mailto:pylons-discus...@googlegroups.com>.
> To post to this group, send email to pylons-...@googlegroups.com <mailto:pylons-...@googlegroups.com>.
> Visit this group at http://groups.google.com/group/pylons-discuss.
> For more options, visit https://groups.google.com/d/optout.

Jonathan Vanasco

unread,
May 26, 2015, 3:23:45 PM5/26/15
to pylons-...@googlegroups.com
It's been a long time since I've used Apache, but I think this might be a variation of why I left that architecture.

I recall that if you run mod_wsgi (or mod_python, or mod_perl, or mod_php) on port 80, you could trigger timeout errors from slow connections or cancelled requests.  The fix was to run vanilla apache, or nginx, on port 80 and then proxy back to your dynamic server (apache+mod_wsgi, gunicorn, uwsgi, etc).  The vanilla apache/nginx buffers the request/repsonse, so your dynamic backend doesn't get tied up with pending timeouts or dropped connections, and errors like this don't happen.

That might not be what's going on – it's been a while since I saw errors like this – but I think that might be the issue.

Marco

unread,
May 26, 2015, 3:28:05 PM5/26/15
to pylons-...@googlegroups.com
All,
thanks for the suggestions. I do think it was an interrupted upload.
Marco

--
You received this message because you are subscribed to a topic in the Google Groups "pylons-discuss" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/pylons-discuss/qNkhiMScHZ8/unsubscribe.
To unsubscribe from this group and all its topics, send an email to pylons-discus...@googlegroups.com.
To post to this group, send email to pylons-...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages