Under older versions of mod_wsgi it may not have resulted in an IOError being raised. Instead it could have just cut short the data. In this case detection of a problem relied on your application code or the web framework used having detected that the content received didn't match the request content length and generate an error response.
Graham > On 24 May 2018, at 9:16 am, Leonardo L. P. da Mata <[email protected]> wrote: > > After reverting the 500's continue but the IOError on python disappear. I > guess I need to handle them better. > > 2018-05-23 18:58 GMT-03:00 Graham Dumpleton <[email protected] > <mailto:[email protected]>>: > The problem will exist no matter the mod_wsgi version. The message will be > different in newer versions as message was qualified to get better indication > of what was occurring. So just be aware that message is likely different and > don't go looking for same message. > > Graham > > >> On 24 May 2018, at 7:23 am, Leonardo L. P. da Mata <[email protected] >> <mailto:[email protected]>> wrote: >> >> Looks like there not all the requests are throwing this IOError Exception on >> python, I will revert the mod_wsgi to check if the number of 500's decrease. >> >> 2018-05-23 17:51 GMT-03:00 Leonardo L. P. da Mata <[email protected] >> <mailto:[email protected]>>: >> Hey Graham, thanks. >> >> It doesn't look as a log rotation problem since it appears more than once on >> the same log file, but it looks like a issue with client drop of connection. >> The clients are most mobile apps and only a feel are curl php connection. >> >> The percentage of 500's is very low, around 0.1% of the requests. >> >> Maybe I should capture the error and fail gracefully, right? This doesn't >> look as a mod_wsgi <-> flask interaction issue.. >> >> >> >> 2018-05-23 17:42 GMT-03:00 Graham Dumpleton <[email protected] >> <mailto:[email protected]>>: >> There error usually indicates that the client dropped the connection, or >> connection was lost for some other reason, while still sending request >> content. >> >> How often does it occur? >> >> Does it happen at exact same time (or two times) a day. If seeing this, can >> be caused by log rotate service force restarting Apache and breaking >> connections. >> >> Graham >> >>> On 24 May 2018, at 4:25 am, Leonardo L. P. da Mata <[email protected] >>> <mailto:[email protected]>> wrote: >>> >>> Hello folks, >>> >>> After upgrading to the latest version of mod_wsgi I'm getting some errors >>> on my flask project: >>> >>> IOError: Apache/mod_wsgi request data read error: Partial results are valid >>> but processing is incomplete. >>> They happen on this part of the code: >>> # Just accept json requests >>> app.before_request(hooks.validate_content_type) >>> >>> >>> def validate_content_type(): >>> if request.method == 'GET' or not request.get_data(): >>> return >>> >>> Which according to flask >>> http://flask.pocoo.org/docs/1.0/api/#flask.Flask.before_request >>> <http://flask.pocoo.org/docs/1.0/api/#flask.Flask.before_request> >>> it Registers a function to run before each request. >>> >>> >>> have you seen this issue on mod_wsgi before? >>> >>> Thanks >>> 2018-05-18 16:40 GMT-03:00 Leonardo L. P. da Mata <[email protected] >>> <mailto:[email protected]>>: >>> Hello Graham, after upgrading the module and changing the number of process >>> and threads for 10 and 3, I was able to achieve a improvement from 85req/s >>> to 95req/s >>> >>> I still need to verify the usage of event mode since we had some problems >>> in the past with Session management on apache in this mode. >>> >>> Thanks for the explanations. BTW, I will submit the updated version of >>> mod_wsgi RPM to Amazon so they might upgrade it. >>> >>> >>> >>> >>> -- >>> Leonardo Luiz Padovani da Mata >>> [email protected] <mailto:[email protected]> >>> >>> "May the force be with you, always" >>> "Nerd Pride... eu tenho. Voce tem?" >>> >>> -- >>> You received this message because you are subscribed to the Google Groups >>> "modwsgi" group. >>> To unsubscribe from this group and stop receiving emails from it, send an >>> email to [email protected] >>> <mailto:[email protected]>. >>> To post to this group, send email to [email protected] >>> <mailto:[email protected]>. >>> Visit this group at https://groups.google.com/group/modwsgi >>> <https://groups.google.com/group/modwsgi>. >>> For more options, visit https://groups.google.com/d/optout >>> <https://groups.google.com/d/optout>. >> >> >> -- >> You received this message because you are subscribed to the Google Groups >> "modwsgi" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to [email protected] >> <mailto:[email protected]>. >> To post to this group, send email to [email protected] >> <mailto:[email protected]>. >> Visit this group at https://groups.google.com/group/modwsgi >> <https://groups.google.com/group/modwsgi>. >> For more options, visit https://groups.google.com/d/optout >> <https://groups.google.com/d/optout>. >> >> >> >> -- >> Leonardo Luiz Padovani da Mata >> [email protected] <mailto:[email protected]> >> >> "May the force be with you, always" >> "Nerd Pride... eu tenho. Voce tem?" >> >> >> >> -- >> Leonardo Luiz Padovani da Mata >> [email protected] <mailto:[email protected]> >> >> "May the force be with you, always" >> "Nerd Pride... eu tenho. Voce tem?" >> >> -- >> You received this message because you are subscribed to the Google Groups >> "modwsgi" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to [email protected] >> <mailto:[email protected]>. >> To post to this group, send email to [email protected] >> <mailto:[email protected]>. >> Visit this group at https://groups.google.com/group/modwsgi >> <https://groups.google.com/group/modwsgi>. >> For more options, visit https://groups.google.com/d/optout >> <https://groups.google.com/d/optout>. > > > -- > You received this message because you are subscribed to the Google Groups > "modwsgi" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected] > <mailto:[email protected]>. > To post to this group, send email to [email protected] > <mailto:[email protected]>. > Visit this group at https://groups.google.com/group/modwsgi > <https://groups.google.com/group/modwsgi>. > For more options, visit https://groups.google.com/d/optout > <https://groups.google.com/d/optout>. > > > > -- > Leonardo Luiz Padovani da Mata > [email protected] <mailto:[email protected]> > > "May the force be with you, always" > "Nerd Pride... eu tenho. Voce tem?" > > -- > You received this message because you are subscribed to the Google Groups > "modwsgi" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected] > <mailto:[email protected]>. > To post to this group, send email to [email protected] > <mailto:[email protected]>. > Visit this group at https://groups.google.com/group/modwsgi > <https://groups.google.com/group/modwsgi>. > For more options, visit https://groups.google.com/d/optout > <https://groups.google.com/d/optout>. -- You received this message because you are subscribed to the Google Groups "modwsgi" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at https://groups.google.com/group/modwsgi. For more options, visit https://groups.google.com/d/optout.
