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

Route Synchronizer is not multi-worker-safe #30

Open
Firefishy opened this issue Mar 13, 2018 · 3 comments
Open

Route Synchronizer is not multi-worker-safe #30

Firefishy opened this issue Mar 13, 2018 · 3 comments

Comments

@Firefishy
Copy link
Contributor

Firefishy commented Mar 13, 2018

The route Synchronizer is not threadsafe and fails to consistently reload routes across threads.

Test case:

  1. Run puma with many threads and a single worker (or low count): puma -t 16:16 -w 0
  2. Add 2 basic mocks. Mock A and Mock B
  3. Run apache bench against Mock A: ab -c 20 -n 200000 http://URL-FOR-MOCK-A
  4. Toggle Mock B on and off a few times.

Expected:
Routes reload as expected.

Observed:
Routes do not load consistently across some app threads and app throws errors due to missing routes.

(PR brewing)

@Firefishy
Copy link
Contributor Author

Testing with puma -t 2:2 -w 8 is also a good check for worker issues.

@Firefishy
Copy link
Contributor Author

Cc: @alkesh

@iridakos iridakos removed the bug 🐛 label Mar 14, 2018
@Firefishy
Copy link
Contributor Author

In limited testing, it seems to be ok when running in single worker mode: -w 0

@Firefishy Firefishy changed the title Route Synchronizer is not threadsafe Route Synchronizer is not multiwork-safe Apr 16, 2018
@Firefishy Firefishy changed the title Route Synchronizer is not multiwork-safe Route Synchronizer is not multi-worker-safe Apr 16, 2018
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

2 participants