Skip to content

Conversation

zzak
Copy link
Member

@zzak zzak commented Sep 9, 2025

This error was found in the logs:

$ tail -50 current/log/puma_error.log
...
puma-5.6.8/lib/rack/version_restriction.rb:12:in `<top (required)>':
Puma 5 is not compatible with Rack 3, please upgrade to Puma 6 or higher. (StandardError)

We probably also need to deal with updating capistrano-puma:
https://github.com/seuros/capistrano-puma?tab=readme-ov-file#upgrading-from-version-5x-to-6x

/cc @fxn I haven't dug that far in yet, just wanted to post this in case people are wondering what happened. I'm not familiar with how this gets deploys, so pointers welcome 🙇

@fxn
Copy link
Member

fxn commented Sep 9, 2025

Thanks @zzak.

This is more complicated. If you look at Gemfile.lock, rack is pinned to 2.2.9 (here).

There are several unknowns:

  1. Why did Puma all of a sudden showed this error today?
  2. Why is it dealing with Rack 3 when the bundle does not have it?

Plus, Puma is now managed my systemd, which is a setup I do not control.

I spent some time this morning trying to understand what was going on, but cannot spend more time today. I asked the core team if someone could continue.

For now, this upgrade should not be necessary and we need to understand the root cause.

@rafaelfranca
Copy link
Member

Plus, Puma is now managed my systemd, which is a setup I do not control.

That is the only way puma recommends deploying. See #203

@rafaelfranca
Copy link
Member

  1. Why did Puma all of a sudden showed this error today?

Did anyone try to deploy or restart the application today?

  1. Why is it dealing with Rack 3 when the bundle does not have it?

It seems it is a problem in bundler. It run a command without the bundler env https://github.com/puma/puma/blob/6c4decd0954ad2fa3c8a04738856656bdc957913/lib/puma/launcher/bundle_pruner.rb#L39. So of course that loads the newest version of rack on that Ruby version that is 3.2.1. And the command will block.

Not sure why bundler does that.

Stop + Start the systemd process fix the problem, but I'm pretty sure all restarts will have this problem now.

It seems like puma should not be protecting against rack version when trying to reload the bundler environment.

This error was found in the logs:

```
puma-5.6.8/lib/rack/version_restriction.rb:12:in `<top (required)>':
Puma 5 is not compatible with Rack 3, please upgrade to Puma 6 or higher. (StandardError)
```

We probably also need to deal with updating capistrano-puma:
https://github.com/seuros/capistrano-puma?tab=readme-ov-file#upgrading-from-version-5x-to-6x
@rafaelfranca rafaelfranca merged commit afc76fc into rails:main Sep 9, 2025
1 check passed
@zzak
Copy link
Member Author

zzak commented Sep 9, 2025

Thanks both for stepping in!

Did anyone try to deploy or restart the application today?

I tried restarting it through systemd, but got the same error.

@zzak zzak deleted the bump-puma branch September 9, 2025 13:33
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

Successfully merging this pull request may close these issues.

3 participants