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

Polish multiprocessing #49

Open
3 of 5 tasks
pkgw opened this issue Jan 29, 2018 · 1 comment
Open
3 of 5 tasks

Polish multiprocessing #49

pkgw opened this issue Jan 29, 2018 · 1 comment

Comments

@pkgw
Copy link
Contributor

pkgw commented Jan 29, 2018

It looks like the multiprocessing approach increases system throughput, so we should polish it. To solve:

  • database SSL errors upon bootup
  • how to partition/manage background tasks in a multi-process model?
  • auditing for race conditions in DB modifications
  • proper shutdown behavior when ^C'ed
  • periodic task reports not always happening?
@pkgw pkgw self-assigned this Jan 29, 2018
@pkgw
Copy link
Contributor Author

pkgw commented Oct 24, 2018

Several of these have been dealt with. The background tasks are still thorny — the current model is that the intention is that background tasks always occur on server process #0, but I've seen cases where things get executed on other processes. There needs to be an audit of all of the entry points where background tasks might get launched.

The Server Admin → Tasks page is now problematic. It only shows useful information if your HTTP request happens to have been handled by server process #0. I don't see how to do this more robustly besides starting to log task state in the backing database. To mirror current behavior, this could be a temporary table that's cleared out every time the server starts up, but it could also become a long-lived log of tasks performed.

If the task state starts getting shared between processes using a common database table, then maybe it will be possible and/or desirable to life the restriction that all background tasks should be launched from process #0.

@pkgw pkgw removed their assignment Jan 2, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant