IOError: ' sys.stdout access restricted by mod_wsgi'
Bug #1089827 reported by
Michael Nelson
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Ratings and Reviews server |
Fix Released
|
High
|
Unassigned | ||
txStatsD |
Fix Committed
|
Undecided
|
Sidnei da Silva |
Bug Description
We had over 30k oopses last night on staging rnr, which seems to be caused by twisted accessing a stdout attribute within our wsgi process. Here's an example oops:
https:/
and a description of the problem can be found at:
http://
We should be able to reproduce this locally to find the cause.
Related branches
lp:~sidnei/txstatsd/catch-mod_wsgi-ioerror
- Anthony Lenton (community): Approve
- Michael Nelson (community): Approve
-
Diff: 28 lines (+11/-4)1 file modifiedtxstatsd/client.py (+11/-4)
To post a comment you must log in.
AFAICT, the cause is a change between twisted releases 11.0.0 and 11.1.0.
Our staging server (waxapple) had 11.1.0 installed yesterday [1], although I can't be certain from which version it was upgraded from the info that I have.
The line causing the IOError is accessing stdout in the 11.1.0 twisted release [2], which is not accessed at all in the twisted 11.0.0 release [3].
Our production service is still running with python-twisted-core 10.0.0 [4].
As this will effect any wsgi service using txstatsd, I'll mark it as affected also, although we can probably just use the WSGIRestrictStdout directive to avoid the exception.
[1] https:/ /pastebin. canonical. com/80387/ twistedmatrix. com/trac/ browser/ tags/releases/ twisted- 11.1.0/ twisted/ python/ log.py# L658 twistedmatrix. com/trac/ browser/ tags/releases/ twisted- 11.0.0/ twisted/ python/ log.py# L621 /pastebin. canonical. com/80391/
[2] http://
[3] http://
[4] https:/