Software⏱️ 2 min read📅 2026-05-31

How to Fix: How to disable timeout for nginx?

Configure nginx timeout settings to prevent infinite delays.

Quick Answer: Add the following lines to your nginx configuration file: "timeout 30s;" and "client_timeout 30s;" to set both server and client timeouts to 30 seconds.

To disable the timeout for Nginx, you need to adjust the 'proxy_read_timeout' and 'proxy_send_timeout' directives in your server configuration.

⚠️ Common Causes

  • Insufficient timeout settings can lead to delayed responses and 504 Gateway Time-out errors.

🔧 Proven Troubleshooting Steps

Method 1: Adjusting Timeout Directives

  1. Step 1: Open your Nginx configuration file in a text editor.

Method 2: Adding 'proxy_read_timeout' and 'proxy_send_timeout' Directives

  1. Step 1: Add the following lines to your server configuration file:
server { listen 80; server_name myvirtualhost1.local; location / { proxy_pass http://127.0.0.1:8080; proxy_read_timeout 3600; proxy_send_timeout 3600; } }

💡 Conclusion

By adjusting the 'proxy_read_timeout' and 'proxy_send_timeout' directives, you can disable the timeout for your Nginx reverse proxy and prevent 504 Gateway Time-out errors.

Did this fix your problem?

If not, try searching for specific error codes.

🔍 Search Error Database

❓ Frequently Asked Questions