Why my Puma app on Common Runtime suddenly started recording H12s and H27s?

Issue

Without a change in the app code, my Heroku app on Cedar-generation Common Runtime running Puma as the web server suddenly started recording higher response time along with increased number of H12 - Request timeout and H27 - Client Request Interrupted errors.

Resolution

Please try updating Puma to 6.5.0 or above and adding the following line to config/puma.rb:

enable_keep_alives false

The change in the app's behavior may have been triggered by migration of the app to Router 2.0 which supports keep alives by default. As explained in the detail in the blog post Pumas, Routers & Keepalives—Oh my!. the interaction between Router 2.0 and Puma with connections kept alive may result with higher response time. Puma 6.5.0 or above has the option to disable keep alives.

Ask on Stack Overflow

Engage with a community of passionate experts to get the answers you need

Ask on Stack Overflow

Heroku Support

Create a support ticket and our support experts will get back to you

Contact Heroku Support