Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for pre-forking #26

Closed
alexkiro opened this issue Sep 26, 2014 · 0 comments
Closed

Add support for pre-forking #26

alexkiro opened this issue Sep 26, 2014 · 0 comments
Assignees
Milestone

Comments

@alexkiro
Copy link
Contributor

@alexkiro alexkiro commented Sep 26, 2014

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 SocketServer.UDPServer, or even drop using completely and implement our own version.

@alexkiro alexkiro self-assigned this Sep 26, 2014
@alexkiro alexkiro added this to the 1.0 milestone Sep 26, 2014
alexkiro pushed a commit that referenced this issue Sep 26, 2014
alexkiro pushed a commit that referenced this issue Oct 28, 2014
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.
alexkiro pushed a commit that referenced this issue Oct 28, 2014
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.
alexkiro pushed a commit that referenced this issue Dec 10, 2014
@alexkiro alexkiro closed this Dec 10, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
1 participant