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

Puma initialization issue #4

Closed
gingermusketeer opened this issue Jul 5, 2018 · 2 comments
Closed

Puma initialization issue #4

gingermusketeer opened this issue Jul 5, 2018 · 2 comments

Comments

@gingermusketeer
Copy link
Contributor

I have setup the gem with the recommended initialization approach for rails apps but if there is an issue during startup It puts puma into a loop until it is able to connect to the unleash server.

This often has a result of requiring me to restart my computer as puma seems to create processes until this is successful.

Would it make sense for the initial connection to result in a warning instead?

Also is using the on_worker_boot required if using puma? The reason I ask is that it means that Rails.configuration.unleash is not present in the rails console. Having this available is handy for debugging.

@rarruda
Copy link
Collaborator

rarruda commented Jul 5, 2018

This is not a scenario I have tested.

But note, puma creates multiple workers by default. Unleash-client needs to have one client instantiated per worker, and each client (by default) has two threads per client.

Also note that the scheduled tasks will stop retrying after 3 exceptions in a row, to avoid errors getting thrown all the time, like you are mentioning. See https://github.com/Unleash/unleash-client-ruby/blob/master/lib/unleash/scheduled_executor.rb#L31

I will try to recreate your issue locally, and will get back to you soon.

@rarruda rarruda changed the title Initialization Puma initialization issue Jul 5, 2018
@gingermusketeer
Copy link
Contributor Author

I have tried to reproduce this problem again but have been unable to do so. I suspect that either upgrading to the latest version of puma or this gem has resolved the issue.

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