Heroku H12 Request Timeout Error

Share
Workaround available All Updated November 13, 2026Based on 4 user reportsHow we research

Quick answer

H12 means a request took more than 30 seconds to start returning data. The limit cannot be raised, so move slow work to a background job and speed up the request.

Most likely fix: Move long work to a background job

How to fix it

Try these in order — the most common fix is first.

  1. 1. Move long work to a background job

    1. Add a worker process type to the Procfile (for example worker: bundle exec sidekiq)
    2. Enqueue the job in the request, respond right away, let the client poll
    3. Scale it: heroku ps:scale worker=1
    Did this fix it?
  2. 2. Add an app-level timeout below 30 seconds

    1. Set a service timeout of 10-15 seconds (rack-timeout for Ruby, Unicorn timeout 15, or your framework's equivalent)
    2. This turns hung requests into traceable errors instead of silent H12s
    Did this fix it?
  3. 3. Put timeouts on every outbound call

    1. Set connect and read timeouts on HTTP clients
    2. Or call the third party from a background job
    Did this fix it?
  4. 4. Find the slow request

    1. Run heroku logs --tail and grep for H12 to see the path
    2. Use an APM add-on such as New Relic and look at p99 service time and queue time
    3. Check slow queries on Heroku Postgres
    Did this fix it?
  5. 5. Reduce queueing

    1. Run more processes per dyno (for example more Puma/Unicorn workers)
    2. Speed up slow endpoints
    3. Add dynos: heroku ps:scale web=2 (needs Standard or higher for multiple dynos with autoscaling)
    Did this fix it?
  6. 6. Upload big files directly to S3

    1. Use a presigned S3 upload from the browser instead of posting through the dyno
    Did this fix it?

Symptoms

Heroku logs show code=H12 desc="Request timeout"; users see an Application error page after about 30 seconds.

Why it happens

  • Slow database queries or N+1 queries
  • Calls to slow external APIs with no timeout
  • Heavy work (PDF, images, exports, scraping) done inside the request
  • Requests queued behind slow ones in a single-threaded process
  • Large uploads going through the dyno

This guide also covers

  • heroku h12 request timeout
  • heroku request timeout 30 seconds
  • heroku h12 error fix
  • heroku 503 request timeout

Still not working?

If Heroku keeps failing, you're not alone. See every Heroku problem users report or the alternatives people switch to.

Have an app idea? Our small team builds any software: web and mobile apps, games, desktop, AI tools. Price agreed together.

Talk to us
Fixed it? Share this guide

The same problem in other apps

All not loading, error messages & connection guides →

Other Heroku errors

All 11 Heroku errors and fixes →