Skip to content

Remove the threads limit from the Capybara Puma server#9422

Merged
andreslucena merged 4 commits intodecidim:developfrom
mainio:chore/capybara-server-threads
Jun 16, 2022
Merged

Remove the threads limit from the Capybara Puma server#9422
andreslucena merged 4 commits intodecidim:developfrom
mainio:chore/capybara-server-threads

Conversation

@ahukkanen
Copy link
Copy Markdown
Contributor

@ahukkanen ahukkanen commented Jun 10, 2022

🎩 What? Why?

In the past we added the min-max threads limit as 1:1 to the puma server running during the "system" / E2E tests at #7366.

The reason was that there were specific tests that were constantly timing out and we figured we could fix this issue by limiting the threads to 1:1 allowing the tests to finish properly.

The particular test that was freezing was related to the admin newsletters view. Later during Ruby 3 upgrade, we figured out that there was actually a thread safety issue with Webpacker which caused the newsletters view to fail when using more than a single thread. This was fixed at #9203.

So I believe after #9203 the original issue described at #7366 no longer exists which means we can remove the threads limit.

I'm not expecting any major benefits from this but I feel it might be a good idea to also run the tests in multi-threaded mode so that we can identify possible further thread safety issues when they arise.

📌 Related Issues

Testing

📋 Checklist

  • CONSIDER adding a unit test if your PR resolves an issue.
  • ✔️ DO check open PR's to avoid duplicates.
  • ✔️ DO keep pull requests small so they can be easily reviewed.
  • ✔️ DO build locally before pushing.
  • ✔️ DO make sure tests pass.
  • ✔️ DO make sure any new changes are documented in docs/.
  • ✔️ DO add and modify seeds if necessary.
  • ✔️ DO add CHANGELOG upgrade notes if required.
  • ✔️ DO add to GraphQL API if there are new public fields.
  • ✔️ DO add link to MetaDecidim if it's a new feature.
  • AVOID breaking the continuous integration build.
  • AVOID making significant changes to the overall architecture.

@ahukkanen ahukkanen added target: developer-experience type: internal PRs that aren't necessary to add to the CHANGELOG for implementers labels Jun 10, 2022
@ahukkanen ahukkanen marked this pull request as draft June 10, 2022 17:41
@ahukkanen ahukkanen mentioned this pull request Jun 14, 2022
12 tasks
Copy link
Copy Markdown
Contributor Author

@ahukkanen ahukkanen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note for the reviewer:
If you are wondering why I disabled the queue_requests option.

@ahukkanen ahukkanen marked this pull request as ready for review June 14, 2022 20:44
@ahukkanen ahukkanen requested a review from andreslucena June 15, 2022 07:43
@andreslucena andreslucena merged commit 319b0e5 into decidim:develop Jun 16, 2022
@ahukkanen ahukkanen deleted the chore/capybara-server-threads branch June 16, 2022 09:53
andreslucena pushed a commit that referenced this pull request Jul 6, 2022
* Remove the threads limit from the Capybara Puma server

* Disable Puma queue_requests option for the Capybara server
eliegaboriau pushed a commit to eliegaboriau/decidim that referenced this pull request Oct 25, 2022
* Remove the threads limit from the Capybara Puma server

* Disable Puma queue_requests option for the Capybara server
@alecslupu alecslupu added this to the 0.27.0 milestone Jul 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

target: developer-experience type: internal PRs that aren't necessary to add to the CHANGELOG for implementers

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants