pythonnginxflaskuwsgi

How to avoid printing unnecessary UWSGI error messages in the log file


My Flask app is generating thousands of

'OSError: write error'

messages in my log file (my log file is defined in the .ini file; logger = '/temp/my_app.log). Most of them happen due to users disconnecting from the server or cancelling a request. I only need my error handling messages to show up in the log file, and not these uwsgi error messages. Is there any configuration that I need to do in my uwsgi .ini file?


Solution

  • There are several configuration options that may be helpful in your case:

    Personally I prefer to set all three options.