It seems like handling request in separate threads/processes doesn't work well under real traffic conditions. (Although benchmarking PyPy + multi-threading did show some promising results)
We should try and add support for pre-forking, and see how that performs. This does mean will likely need to hack around
The text was updated successfully, but these errors were encountered:
Add a new classmethod to the server engines that yields partial functions that return a new database connection. This functions are called in the child process instead of the parent one, thus preventing any possible issues. MySQL engines also have a special rule that only enables expiry on a single database connection, since only one "reorganizing" daemon thread is necessary.
Run basic checks on a Pyzor pre-forked server with mysql and redis engines (currently the only ones that support pre-forking). Also switch to using SIGTERM instead of SIGKILL when stopping pyzord server in functional tests. This ensures a clean shut-down and all child processes are being stopped.