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
No longer do phased-restart on systemd but works on run locally #2476
Comments
P.S.: I also see some errors on syslog like:
|
I believe I located the issue. Environment called |
That's because
You have restored the behaviour you had before with 4.x. The environment variable It is still weird that you had these issues, from what I see here, the change that Puma 5.0 brought shouldn't have changed the behaviour for your setup... 🤔 |
Ah, you are using |
@dentarg I've removed experimental It may cause some serious problems in the future as stated on other issues. P.S.: I've tested |
I think @dentarg might be misreading the config linked.
When you say "removing WEB_CONCURRENCY" I assume you mean "I removed the line which sets WEB_CONCURRENCY in my systemd.service". Did you remove the When you boot Puma now, how many workers are started? |
The question here is why is your app You don't have |
You also posted a config with I think you have an issue regarding what config file is being loaded in production. |
I've removed this line from systemd service:
Instead added this:
And used this variable in config/puma/production.rb:
This way, I got BTW, When I run with this configuration, 10 workers started (instead of 20) and phased restart is available. |
My final configurations: config/puma/production.rb:
systemd/api.service:
.env:
In this configuration here is the results:
|
OK, I'm not sure why that worked for you, but it sounds like you've solved your issue and there's no problem with Puma? |
@nateberkopec Puma 5 (#2143) changed the default, if there are more than 1 worker, |
Seems like it is only if number of workers is set via That would explain why not using |
Closing and moving future discussion to #2483 because the issue is now clear. |
Describe the bug
When I run:
Phased restart is available and I am able to send
phased-restart
request from Systemd orpumactl
. However, If this app started via systemdsystemctl start api.target
then phased restart is not available.Puma config:
systemd.service:
syslog when
systemctl start api.target
is ran:Error in stdout when phased-restart is initiated:
To Reproduce
Just start with above config via systemd. No phased-restart. Then run this command from SSH Shell and phased restart is available.
Expected behavior
phased restart should be available when puma started from systemd.
Desktop (please complete the following information):
Am I missing something here? It was working on v4.x. I re-read docs but it seems everything is correct. Configuration is also correct because when I run puma manually with above config, phased restart is working. But when do systemd start, it says
preloading
app. Strange.The text was updated successfully, but these errors were encountered: