Skip to content
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

IOError: [Errno 90] Message too long #1265

Open
marc1n opened this issue May 25, 2016 · 7 comments
Open

IOError: [Errno 90] Message too long #1265

marc1n opened this issue May 25, 2016 · 7 comments

Comments

@marc1n
Copy link

marc1n commented May 25, 2016

uWSGI does not handle properly printing to stdout big strings when using logger option.

$ uwsgi --version
2.0.13.1

$ uname -a
Linux 4.4.0-22-generic #40-Ubuntu SMP Thu May 12 22:03:46 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux

Example:

$ rm -f /tmp/uwsgi.log; uwsgi --http=:9090 --logger=file:/tmp/uwsgi.log --eval='print "x" * 300000'; tail /tmp/uwsgi.log
Python version: 2.7.11+ (default, Apr 17 2016, 14:00:29) [GCC 5.3.1 20160413]
*** Python threads support is disabled. You can enable it with --enable-threads ***
Python main interpreter initialized at 0x144f9c0
your server socket listen backlog is limited to 100 connections
your mercy for graceful operations on workers is 60 seconds
mapped 145536 bytes (142 KB) for 1 cores
*** Operational MODE: single process ***
Traceback (most recent call last):
File "uwsgi_eval_config", line 1, in
IOError: [Errno 90] Message too long

@marc1n
Copy link
Author

marc1n commented Oct 25, 2016

Maybe it is the same reason as in #1266 - stdout is set as nonblocking.

Errno 90 == EMSGSIZE and https://linux.die.net/man/2/send:
EMSGSIZE
The socket type requires that message be sent atomically, and the size of the message to be sent made this impossible.

@marc1n
Copy link
Author

marc1n commented Aug 21, 2017

Any ideas?

@marc1n
Copy link
Author

marc1n commented Jan 12, 2018

If we set option log-master-stream = true than we have error from issue #1266

@skob
Copy link

skob commented Jul 31, 2019

any news ?..

@sindhujit
Copy link

sindhujit commented Jan 10, 2020

Received same issue in our app recently.
we have

master = True
daemonize   =   true
# logging
logger  =   file:Path to log file

# clear environment on exit
vacuum  =   true

any news on this guys?

@marc1n
Copy link
Author

marc1n commented May 8, 2020

I've finally found a workaround. Set the option --log-master-bufsize to a value bigger than printed string (for example 1000000). Default is 8192.

@sindhujit1
Copy link

sindhujit1 commented Jul 10, 2020

I've finally found a workaround. Set the option --log-master-bufsize to a value bigger than printed string (for example 1000000). Default is 8192.

This did not work for me. I added three zeros on top of 1000000. Still gives same error.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants