Matt Phipps
2014-09-18 22:06:26 UTC
Hi uWSGI,
We've got a Flask (Python) app using dogpile.cache, and are having a
strange production issue where the cache doesn't seem to be refreshing. My
suspicion is that a request locked a cache key, started getting a fresh
value from the DB, then was terminated before it could unlock the cache key.
So here's my question: if we have reload-on-exception on and multiple
threads per worker (as we do), 2 threads are handling requests at the same
time, and one of them encounters an exception (e.g. IOError from SIGPIPE)
that causes uWSGI to reload the worker, will uWSGI wait for the second
thread to finish its response, or will it just kill the worker immediately?
Thanks,
Matt
We've got a Flask (Python) app using dogpile.cache, and are having a
strange production issue where the cache doesn't seem to be refreshing. My
suspicion is that a request locked a cache key, started getting a fresh
value from the DB, then was terminated before it could unlock the cache key.
So here's my question: if we have reload-on-exception on and multiple
threads per worker (as we do), 2 threads are handling requests at the same
time, and one of them encounters an exception (e.g. IOError from SIGPIPE)
that causes uWSGI to reload the worker, will uWSGI wait for the second
thread to finish its response, or will it just kill the worker immediately?
Thanks,
Matt