Deep-dive on the Next Gen Platform. Join the Webinar!

Skip Navigation
Show nav
Dev Center
  • Get Started
  • Documentation
  • Changelog
  • Search
  • Get Started
    • Node.js
    • Ruby on Rails
    • Ruby
    • Python
    • Java
    • PHP
    • Go
    • Scala
    • Clojure
    • .NET
  • Documentation
  • Changelog
  • More
    Additional Resources
    • Home
    • Elements
    • Products
    • Pricing
    • Careers
    • Help
    • Status
    • Events
    • Podcasts
    • Compliance Center
    Heroku Blog

    Visit the Heroku Blog

    Find news and updates from Heroku in the blog.

    Visit Blog
  • Log inorSign up
Hide categories

Categories

  • Heroku Architecture
    • Compute (Dynos)
      • Dyno Management
      • Dyno Concepts
      • Dyno Behavior
      • Dyno Reference
      • Dyno Troubleshooting
    • Stacks (operating system images)
    • Networking & DNS
    • Platform Policies
    • Platform Principles
  • Developer Tools
    • Command Line
    • Heroku VS Code Extension
  • Deployment
    • Deploying with Git
    • Deploying with Docker
    • Deployment Integrations
  • Continuous Delivery & Integration (Heroku Flow)
    • Continuous Integration
  • Language Support
    • Node.js
      • Working with Node.js
      • Troubleshooting Node.js Apps
      • Node.js Behavior in Heroku
    • Ruby
      • Rails Support
      • Working with Bundler
      • Working with Ruby
      • Ruby Behavior in Heroku
      • Troubleshooting Ruby Apps
    • Python
      • Working with Python
      • Background Jobs in Python
      • Python Behavior in Heroku
      • Working with Django
    • Java
      • Java Behavior in Heroku
      • Working with Java
      • Working with Maven
      • Working with Spring Boot
      • Troubleshooting Java Apps
    • PHP
      • PHP Behavior in Heroku
      • Working with PHP
    • Go
      • Go Dependency Management
    • Scala
    • Clojure
    • .NET
      • Working with .NET
  • Databases & Data Management
    • Heroku Postgres
      • Postgres Basics
      • Postgres Getting Started
      • Postgres Performance
      • Postgres Data Transfer & Preservation
      • Postgres Availability
      • Postgres Special Topics
      • Migrating to Heroku Postgres
    • Heroku Key-Value Store
    • Apache Kafka on Heroku
    • Other Data Stores
  • AI
    • Working with AI
  • Monitoring & Metrics
    • Logging
  • App Performance
  • Add-ons
    • All Add-ons
  • Collaboration
  • Security
    • App Security
    • Identities & Authentication
      • Single Sign-on (SSO)
    • Private Spaces
      • Infrastructure Networking
    • Compliance
  • Heroku Enterprise
    • Enterprise Accounts
    • Enterprise Teams
    • Heroku Connect (Salesforce sync)
      • Heroku Connect Administration
      • Heroku Connect Reference
      • Heroku Connect Troubleshooting
  • Patterns & Best Practices
  • Extending Heroku
    • Platform API
    • App Webhooks
    • Heroku Labs
    • Building Add-ons
      • Add-on Development Tasks
      • Add-on APIs
      • Add-on Guidelines & Requirements
    • Building CLI Plugins
    • Developing Buildpacks
    • Dev Center
  • Accounts & Billing
  • Troubleshooting & Support
  • Integrating with Salesforce
  • Heroku Architecture
  • Compute (Dynos)
  • Dyno Troubleshooting
  • Addressing H12 Errors (Request Timeouts)

Addressing H12 Errors (Request Timeouts)

English — 日本語に切り替える

Last updated December 03, 2024

Table of Contents

  • Remediating a High Number of H12 Errors
  • Restart Dynos
  • Rollback
  • Scale Dynos to Handle Increased Traffic
  • Next Steps

This article contains steps for addressing a sudden increase in the number of H12 Request Timeout errors in your app. These errors occur when an HTTP request takes longer than 30 seconds to complete. They’re often caused by:

  • Long-running requests, such as expensive queries or a slow external API call.
  • Insufficient concurrency resulting in high request queue times during spikes in traffic.

For long-term mitigation, see Preventing H12 Errors (Request Timeouts).

Remediating a High Number of H12 Errors

Execute each remediation step in the following order. It may not be necessary to complete each step to achieve a reduction in H12 errors. Check the Heroku Dashboard after each step to see if the number of errors has decreased.

Restart Dynos

A restart cancels long-running requests. Restarting can resolve H12 issues because freshly-booted dynos receive requests without interference from long-running requests.

Using the Heroku CLI, run heroku ps:restart --process-type web to restart all web dynos. or, using the Heroku Dashboard, click More, then Restart all dynos.

Restart all dynos button in the dashboard

Rollback

If the spike in H12 errors coincides with a specific deployment, the code change may have caused long-running requests.

Using the Heroku CLI, run heroku rollback to roll back to the last release.

Or, in the Activity tab of the Heroku Dashboard, click Roll back to here beside the last release.

Scale Dynos to Handle Increased Traffic

Restarting dynos doesn’t help with issues caused by traffic spikes. However, adding or upgrading dynos provides more resources to address the increased throughput.

Check throughput in the Heroku Dashboard or attached monitoring add-on (if applicable). See the Metrics article for more information on throughput.

Add Additional Dynos

A larger dyno pool provides more processes to address increased throughput, reducing timeouts as request queue times shorten.

Add additional dynos via the Heroku Dashboard or the CLI. See Scaling for full instructions.

Upgrade Dynos

The application’s dynos may be undersized for its concurrency settings. Upgrading dynos to a higher tier provides more compute resources for processes to use.

Check the Heroku Dashboard. Upgrade dynos if either are true:

  • Dyno memory usage is near or above 100%.
  • Dyno load is near or above the acceptable load for your dyno type.

Next Steps

The remediation steps in this article serve to address immediate H12 errors. It is important to address any slow-performing code within the application or capacity issues to minimize these errors in the future. Review Preventing H12 Errors (Request Timeouts) for tips for future mitigation.

Keep reading

  • Dyno Troubleshooting

Feedback

Log in to submit feedback.

Troubleshooting One-Off Dynos Awaiting Process Timeout Issues Preventing H12 Errors (Request Timeouts)

Information & Support

  • Getting Started
  • Documentation
  • Changelog
  • Compliance Center
  • Training & Education
  • Blog
  • Support Channels
  • Status

Language Reference

  • Node.js
  • Ruby
  • Java
  • PHP
  • Python
  • Go
  • Scala
  • Clojure
  • .NET

Other Resources

  • Careers
  • Elements
  • Products
  • Pricing
  • RSS
    • Dev Center Articles
    • Dev Center Changelog
    • Heroku Blog
    • Heroku News Blog
    • Heroku Engineering Blog
  • Twitter
    • Dev Center Articles
    • Dev Center Changelog
    • Heroku
    • Heroku Status
  • Github
  • LinkedIn
  • © 2025 Salesforce, Inc. All rights reserved. Various trademarks held by their respective owners. Salesforce Tower, 415 Mission Street, 3rd Floor, San Francisco, CA 94105, United States
  • heroku.com
  • Legal
  • Terms of Service
  • Privacy Information
  • Responsible Disclosure
  • Trust
  • Contact
  • Cookie Preferences
  • Your Privacy Choices