On Thu, Sep 28, 2017 at 7:17 PM, <
jens.t...@gmail.com> wrote:
> Thank you, Mike!
>
> I would have never extracted your interpretation from the trace! (I don’t
> know the code…)
>
> The two questions that arise now, though, are
>
> - Why would connections drop out of the pool, is this a configuration
> problem that I should worry about?
something was already wrong with the connection when the pool got it
back, so it had to be discarded. as far as what was wrong, it had to
do with the request itself, and it was very possibly the web request's
client dropped the connection, e.g. user hit the stop button. Not
sure what uswgi does but it might have called a thread.exit() /
SystemExit that interrupted PyMySQL's work on the socket. This is
something we definitely see in the eventlet world at least.
> - The request still failed with a 502 although, as you said, it’s a
> harmless exception. What is the proper way of handling these situations?
if uwsgi is killing off threads when a connection is cut, it might
want to be more graceful about that and at least log that the thread
was killed in the middle. If this is in fact what's going on. I
stick with apache/mod_wsgi for reasons like these.