-
Notifications
You must be signed in to change notification settings - Fork 691
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
Threaded-logger option causes [Errno 90 message too long] #1093
Comments
Are you sure this is uwsgi failing to write to the logfile and not django writing to syslog maybe? |
Actually I believe the problem has nothing to do with the logfile plugin. Rather the problem manifests only when the threaded-logger option is turned on. |
I removed anything related to logfile and syslog yet still had the problem. It wasn't until five hours later I noticed that I had turned on threaded-logger. I don't know why but for some reason the error vanished when I turned the threaded logger off. |
@brianjsw please don't rewrite original bug report :) Please provide a logger option config that in combination with threaded-logger make the error happen. |
If you include threaded-logger=True in your config, and if you have a logto=/path/to/your/file in your config, and you use that wsgi.py file with the large print statement, that will cause the exception. |
See also issue #1265. |
I noticed that when I use the threaded-logger option that if a badly behaved third party python package just so happens to decide to print more than 212,960 bytes to stdout that uWSGI generates an Error 90 "message too long" exception and this terminates execution of the thread. Notwithstanding the fact that this third party package should not be "printing" because it's being hosted in uWSGI, I would think we would still want to avoid crashing just because an app decides to "print a long string". Some sites suggest routing Django logging to the console using the StreamHandler, and in that case this same issue will also affect anybody who makes the dubiously poor decision of trying to log a message that long.
To reproduce this, simply put:
And in your wsgi.py put:
print 212961 * 'T' at the end of the file.
The text was updated successfully, but these errors were encountered: