Execution Limits
| Limit | Default | Maximum |
|---|---|---|
| Request timeout | 30 seconds | 60 seconds |
| CPU time per request | 30 seconds | 60 seconds |
| Memory per container | 256 MB | 512 MB |
| Request body size | 10 MB | 10 MB |
| Response body size | 10 MB | 10 MB |
Request Timeout
Functions must return a response within the timeout period. If exceeded, the request is terminated and returns a 504 Gateway Timeout.Memory
Each container has a fixed memory allocation. If your function exceeds memory limits, the container is terminated and a new one starts for subsequent requests. Tips for memory efficiency:- Stream large files instead of loading into memory
- Use generators for large datasets
- Clean up resources after use
- Avoid global caches that grow unbounded
Function Limits
| Limit | Value |
|---|---|
| Function code size | 50 MB (compressed) |
| Environment variables per function | 64 |
| Environment variable name size | 256 bytes |
| Environment variable value size | 5 KB |
| Secrets per organization | 100 |
| Secret value size | 10 KB |
Code Size
The 50 MB limit includes your code and all dependencies (after compression). Most functions are well under this limit. If you’re hitting size limits:- Remove unused dependencies
- Use lighter alternatives (e.g.,
httpxinstead ofrequests+urllib3) - Exclude development dependencies from production builds
- Consider splitting into multiple functions
Network Limits
| Limit | Value |
|---|---|
| Outbound connections per request | 100 |
| Outbound request timeout | 30 seconds (configurable) |
| DNS resolution timeout | 5 seconds |
Outbound Connections
Each invocation can make up to 100 outbound network connections. This includes:- HTTP/HTTPS requests
- Database connections
- TCP sockets
Rate Limits
| Limit | Value |
|---|---|
| Deployments per hour | 60 |
| API requests per minute | 1,000 |
| Concurrent function invocations | No hard limit (auto-scales) |
Deployment Limits
You can deploy up to 60 times per hour per organization. This is rarely hit in normal development.Invocation Scaling
There’s no hard limit on concurrent invocations — the platform auto-scales to handle traffic. However, each new container incurs a cold start, so extremely spiky traffic may see increased latency.Account Limits
| Limit | Value |
|---|---|
| Functions per organization | 100 |
| Total function invocations | Based on plan |
| Total CPU time | Based on plan |
Need higher limits? Contact support@telnyx.com to discuss enterprise plans.
Storage Limits (Coming Soon)
These limits apply to upcoming storage features:KV Storage
| Limit | Value |
|---|---|
| Key size | 512 bytes |
| Value size | 25 MB |
| Keys per namespace | 1 billion |
| Namespaces per organization | 100 |
| Read operations per second | 10,000 |
| Write operations per second | 1,000 |
SQL Database
| Limit | Value |
|---|---|
| Database size | 10 GB |
| Databases per organization | 10 |
| Rows per table | No hard limit |
| Query timeout | 30 seconds |
Error Handling
When limits are exceeded, the platform returns specific error codes:| Error | Code | Meaning |
|---|---|---|
| Request Timeout | 504 | Function didn’t respond in time |
| Memory Exceeded | 500 | Container terminated due to memory |
| Payload Too Large | 413 | Request/response body exceeded limit |
| Rate Limited | 429 | Too many requests or deployments |
Best Practices
Stay Within Limits
- Set conservative timeouts — Use 25 seconds internally when the platform limit is 30
- Monitor memory — Log memory usage during development
- Stream large data — Avoid buffering entire files
- Use connection pools — Reuse HTTP/database connections
Handle Limit Errors
Next Steps
- Execution Model — Optimize cold starts and performance
- Architecture — Understand the platform
- Configuration — Set environment and timeouts