Limits
The following limits apply to Hyperdrive configurations, connections, and queries made to your configured origin databases.
These limits apply when creating or updating Hyperdrive configurations.
| Limit | Free | Paid |
|---|---|---|
| Maximum configured databases | 10 per account | 25 per account |
| Maximum username length 1 | 63 characters (bytes) | 63 characters (bytes) |
| Maximum database name length 1 | 63 characters (bytes) | 63 characters (bytes) |
These limits apply to connections between Hyperdrive and your origin database.
| Limit | Free | Paid |
|---|---|---|
| Initial connection timeout | 15 seconds | 15 seconds |
| Idle connection timeout | 10 minutes | 10 minutes |
| Maximum origin database connections (per configuration) 2 | ~20 connections | ~100 connections |
Hyperdrive does not limit the number of concurrent client connections from your Workers. However, Hyperdrive limits connections to your origin database because most hosted databases have connection limits.
When Hyperdrive cannot acquire a connection to your origin database, you may see one of the following errors:
| Error message | Cause |
|---|---|
Failed to acquire a connection from the pool. | The connection pool is exhausted because connections are held open too long. Long-running queries or transactions are a common cause. |
Server connection attempt failed: connection_refused | Your origin database is rejecting connections. This can occur when a firewall blocks Hyperdrive, or when your database provider's connection limit is exceeded. |
For a complete list of error codes, refer to Troubleshoot and debug.
These limits apply to queries sent through Hyperdrive.
| Limit | Free | Paid |
|---|---|---|
| Maximum query (statement) duration | 60 seconds | 60 seconds |
| Maximum cached query response size | 50 MB | 50 MB |
Queries exceeding the maximum duration are terminated. Query responses larger than 50 MB are not cached but are still returned to your Worker.
You can request adjustments to limits that conflict with your project goals by contacting Cloudflare. Not all limits can be increased.
To request an increase, submit a Limit Increase Request form ↗. You can also ask questions in the Hyperdrive channel on Cloudflare's Discord community ↗.
-
This is a limit enforced by PostgreSQL. Some database providers may enforce smaller limits. ↩ ↩2
-
Hyperdrive is a distributed system, so a client may be unable to reach an existing pool. In this scenario, a new pool is established with its own connection allocation. This prioritizes availability over strict limit enforcement, which means connection counts may occasionally exceed the listed limits. ↩
Was this helpful?
- Resources
- API
- New to Cloudflare?
- Directory
- Sponsorships
- Open Source
- Support
- Help Center
- System Status
- Compliance
- GDPR
- Company
- cloudflare.com
- Our team
- Careers
- © 2025 Cloudflare, Inc.
- Privacy Policy
- Terms of Use
- Report Security Issues
- Trademark
-