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

Multiple workers are not supported due to locking #25

Open
sfan5 opened this issue Jun 25, 2018 · 0 comments
Open

Multiple workers are not supported due to locking #25

sfan5 opened this issue Jun 25, 2018 · 0 comments
Labels

Comments

@sfan5
Copy link
Contributor

sfan5 commented Jun 25, 2018

When running this under uwsgi with multiple processes (e.g. -p 2), you start seeing errors like this:

  File "./server.py", line 385, in save
    os.rename(list_path + "~", list_path)
FileNotFoundError: [Errno 2] No such file or directory: '/srv/serverlist/static/list.json~' -> '/srv/serverlist/static/list.json'

We do have a lock to prevent multiple threads from doing this, but not to prevent multiple workers from doing this.

@sfan5 sfan5 added the bug label Jun 25, 2018
@sfan5 sfan5 changed the title Locking is ineffective when using multiple workers Multiple workers are not supported due to locking Oct 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant