Do these 3 things before closing this tab:
1Clear out junk files and repair common Windows errors2Scan for outdated or missing drivers - takes under a minute3Repair Windows errors before they cause bigger problemsAn Nginx “upstream timed out (110)” error means Nginx, acting as a reverse proxy, did not complete one stage of its conversation with the backend before the relevant timeout expired. The words after the error—such as while connecting to upstream or while reading response header from upstream—identify the stage that stalled. A browser or API client commonly receives HTTP 504 Gateway Timeout when Nginx gives up.
Need a server to try this on? Antihost offers Linux VPS plans with NVMe storage, full root access and a 14-day free trial.
Do not start by blindly increasing proxy_read_timeout. First identify the phase, measure where the delay occurs, and then decide whether the right fix is a network correction, capacity work, application optimization, a carefully bounded timeout, or a change to retry behavior.
As an Amazon Associate I earn from qualifying purchases.
Windows Errors? Fix Them Before They Spread
Repair common Windows errors and clear accumulated junk for a smoother, more stable PC - no reinstall needed.Free scan · no reinstallCrashes, No Sound, or Screen Glitches?
Random freezes, missing sound and display glitches usually trace back to one bad driver. Find and replace yours safely.Free scan · under a minuteWhat “upstream timed out (110)” means
Nginx sits between a client and an upstream application such as an API server, PHP worker, application process, or WebSocket service. For each proxied request it may need to establish a connection, send the request, wait for response headers, and read the response body. Each stage has its own progress timer.
Error number 110 is the operating system’s timeout condition. The useful diagnostic information is the phrase that follows it:
#1 Best Overall
- [Ultra-Lightweight Ear Buds Designed for Small Ears] Each earbud weighs only 3.7g and features a compact, ergonomic in-ear design made especially for small ears. Secure, low-profile, and comfortable for workouts, all-day wear or overnight sleeping.The ultra-slim profile sits flush in your ear with no hard edges poking or rubbing, so you can even sleep on your side without discomfort.
- [Immersive Stereo Sound with TOZO OrigX Technology] TOZO OrigX tuning delivers clear vocals, balanced mids, and natural stereo sound for music, podcasts, and videos.
- [Long Battery Life for Daily Use] Get up to 7 hours of playtime on a single charge, with up to 32 hours total using the charging case—ideal for workdays, commuting, and extended listening sessions.
- [Bluetooth 5.3 & Stable Connection] Bluetooth 5.3 provides fast pairing, stable wireless performance, and reduced dropouts as you move around home or office.
- [Deep Bass with Clear Vocals] High-performance drivers produce punchy bass while keeping vocals clean and detailed for everyday listening.
| Error-log wording | What stalled | First area to investigate |
|---|---|---|
while connecting to upstream |
Nginx could not establish the upstream connection in time. | Address, port, DNS, routing, firewall, TLS handshake, listener and accept-queue health. |
while sending request to upstream |
Nginx could not continue writing the request. | Whether the backend is reading, request buffering, upload behavior, congestion and backend saturation. |
while reading response header from upstream |
The backend accepted the request but did not send response headers before the read timer expired. | Application work, database calls, worker queues, CPU, memory and expected latency. |
while reading upstream |
The backend started responding, then stopped sending bytes for too long. | Slow response generation, storage, compression, client backpressure or missing streaming heartbeats. |
A 504 is therefore a symptom, not proof that the Nginx host itself is broken. The backend may be healthy but too slow for the configured budget, unreachable at the configured address, overloaded, or intermittently failing.
Nginx proxy timeout defaults and what each timer measures
Current Nginx proxy-module documentation lists 60 seconds as the default for proxy_connect_timeout, proxy_send_timeout and proxy_read_timeout. Those directives do not all measure the same thing.
What’s actually slowing this PC down?
Pick the symptom - the matching free tool is one click away.
| Directive | Default | Timer starts and resets | Important limitation |
|---|---|---|---|
proxy_connect_timeout |
60s | While establishing a connection to the upstream. | Nginx notes that this timeout cannot usually exceed approximately 75 seconds, depending on the operating system and network behavior. |
proxy_send_timeout |
60s | Between successive writes while Nginx sends the request upstream. | It is an idle interval, not a fixed maximum for the entire upload. |
proxy_read_timeout |
60s | Between successive reads while Nginx receives the upstream response. | It is not a maximum duration for the whole response. A backend that periodically sends bytes can remain connected longer than 60 seconds. |
That distinction explains why raising a timeout can appear to “fix” one request while leaving the underlying problem untouched. A 10-minute response that sends a chunk every 20 seconds may be fine with a 60-second read idle timer; a response that sends nothing for 61 seconds will time out even if its eventual total duration would have been acceptable.
Fix a connection timeout: “while connecting to upstream”
This message means Nginx did not complete the connection handshake. It is not an application response-time error yet: Nginx may never have reached a worker that could process the request.
Common causes
- The upstream hostname, IP address or port is wrong.
- The service is stopped, listening only on another interface, or listening on a different port.
- A firewall, security group, routing rule or network policy blocks the Nginx host.
- DNS returns an unusable address, or IPv6 is selected when the service is reachable only over IPv4.
- A TLS handshake is delayed or cannot complete.
- The backend is overloaded and its accept queue is full.
Checks from the Nginx host
- Inspect the active upstream definition and resolve the exact hostname:
getent ahosts backend.example(or the resolver used by your system). - Test the exact address and port, rather than a different service name:
nc -vz 192.0.2.10 8080. For TLS, use an appropriate handshake test such asopenssl s_client -connect backend.example:443 -servername backend.example. - On the backend host, verify the listener with the platform’s socket tool, for example
ss -lntp, and confirm that it accepts connections on the address Nginx is using. - Review firewall and routing rules on both hosts. Check service logs and kernel messages for connection refusals, queue pressure or resource exhaustion.
- Compare connection attempts with the backend’s CPU, memory, worker count and listen/backlog settings.
Increase proxy_connect_timeout only when measured network or handshake latency justifies it. The documented default is 60 seconds, and the practical upper limit is usually about 75 seconds; a larger value cannot repair a dead listener or a blocked route.
Rank #2
- 【IP68 Waterproof Multifunctinal Smart Watch】Torjalph fitness activity tracker smart watch is IP68 waterproof technology ,you can wear it when swimming,handwashing,it's rain-proof which means that you perform multiple exercise modes outside without worrying about sweat or rain corroding your fitness smart watch,and this watch equipped with a 230 mAh large capacity battery magnetic charging ,and this sports activity tracker watch can be used 5-7 days If fully charged.
- 【Larger 1.83'' Full Screen Watch & Multi-dial Selection】1.83 inch full HD color touch screen smart watch for men / women provides excellent 240*284 resolution image quality ,This Bluetooth smart watch offers a better touch experience and remarkable immersion and ,more than 200 watch faces for you to choose from App"Da Fit ", you can change the dial style according to your mood to wear keeping the world on your wrist
- 【Accurate Activity Tracker Smart Watch 】sports watch activity tracker uses sweat and dust resistant breathable silicone strap, our Fitness Tracker Smart Watch for Android iOS Phones supports 12 sports modes,walking,running,bicycle,swimming,badminton,basketball,football,rope skipping. This bluetooth calls smart watch for men women is lightweight and stylish, bringing more convenient and relaxing sports experience while also providing more protection.
- 【Your 24 Hour Personal Daily Health Monitor】Fitness watch for women men full touch screen IP67 waterproof bluetooth smartwatch for Android iOS Phones with heart rate blood pressure monitor multifunction Andriod smart watch with steps counter sleep monitor sports fitness watch, monitoring blood oxygen saturation allows you to understand your physical condition in real time to track fitness progress ,to know your health status in time.
- 【More Functions Bluetooth Call Smart Watch】This fitness activity smart watch full screen for iPhone and Android phones includes a bunch of new features including:The bluetooth smart watch can hang up the phone, receive and display WhatsAPP /Text /Facebook /Twitter /Messenger reminder.Support sedentary reminder, alarm clock, stopwatch, timer,weather information,music control, remote camera control compatible with Android 5.0 and above or iOS 9.0 and above smartphones.
Fix a request-send timeout: “while sending request to upstream”
Here Nginx connected but could not make progress writing the request. The upstream may have stopped reading from its socket, the path may be congested, or the request may be unusually large.
The Tool Desk
Outbyte PC Repair FREEClear out junk files and repair common Windows errorsFree Scan →Outbyte Driver Updater FREEScan for outdated or missing drivers - takes under a minuteDriver Scan →What to inspect
- Confirm the request size, upload rate and whether the endpoint accepts streaming uploads.
- Check Nginx request buffering and any configuration that sends the body directly to the upstream.
- Inspect the backend’s receive behavior: a saturated worker, full queue or blocked application can stop reading even though the TCP connection exists.
- Look for packet loss, bandwidth contention and flow-control stalls between the two hosts.
- Check whether large uploads coincide with CPU, memory, disk or worker exhaustion.
proxy_send_timeout measures the idle time between writes. Increasing it does not grant a single upload an absolute total-duration budget. If the backend is overloaded, a longer idle allowance can keep more connections open and consume capacity without increasing throughput. Fix the receive path or capacity problem first; then set a send timeout that matches a measured, expected pause.
Fix a header-read timeout: “while reading response header from upstream”
This is the common application-latency case. Nginx connected and sent the request, but the backend did not produce HTTP response headers before the read idle timer expired.
Trace the operation that precedes the first byte
- Follow the request through application traces and backend logs using a request identifier where available.
- Measure database query time, lock waits, connection-pool wait time and calls to other services.
- Check worker and thread pools, queue depth, CPU saturation, memory pressure and garbage-collection pauses.
- Look for serialized report generation, large file preparation or synchronous jobs that should be queued.
- Compare the measured tail latency with the configured
proxy_read_timeout.
Raise proxy_read_timeout only when the operation is expected to take that long and the backend has enough capacity to hold the connections. For unpredictable or very long work, return a job identifier and let a queue or background worker perform the operation instead of tying up a proxy connection.
Why a larger read timeout can be harmful
Each waiting request occupies resources in Nginx, the application and often a database connection. If traffic rises while slow requests are allowed to wait indefinitely, queues grow and otherwise healthy requests can time out. Set a finite budget based on the service-level objective, database and worker capacity, and the client’s own deadline.
Rank #3
- [Low Noise High Fidelity] New bee guitar cord with 22AWG oxygen-free-copper center conductors provides enhanced signal transfer, the PVC insulation material and the high-density stranded copper double shield provide noise rejection for quiet operation
- [Ideal for Choice] New bee 1/4 straight and right angle metal connectors, ensures a secure connection in any instrument, pedal, or amp jack. L shape great fro on stage guitar stands
- [Wide Compatible] Suitable for mixer, power amplifier, microphone, effector, decoder, equalizer, electoronic organ, electric guitar, electric bass and other electronic equipments. Widely used in the installation of smart home, karaoke speaker, professional stage audio, etc
- [Easy Disassemble] Making incidental repairs quick and easy! Very nice, flexible cable
- [Dont Hesite to Order] 24 hours customer services and professional technology team are standing by
Fix a body-read timeout: “while reading upstream”
This wording means the backend began sending a response but then produced no bytes for longer than the read idle interval. The response may be large, generated incrementally, read from slow storage, compressed on the fly or held up by downstream backpressure.
Investigate the pause
- Check slow queries, external API calls and storage or object-store reads that occur after headers are sent.
- Measure response-generation and compression CPU usage.
- Check whether the client is reading slowly and causing backpressure.
- For downloads, inspect disk throughput and file-system errors.
- For streaming endpoints, verify that the application sends data or a heartbeat often enough to stay below the idle timeout.
Do not confuse a long total response with an idle response. Nginx documentation describes proxy_read_timeout as the interval between successive reads, not a timer for transmission of the whole response.
WebSocket and streaming connections
For WebSocket proxying, Nginx documents a default closure when the proxied server transmits no data for 60 seconds. A connection that is intentionally quiet must either use a longer read timeout or send periodic ping or heartbeat frames.
map $http_upgrade $connection_upgrade {
default upgrade;
'' close;
}
location /chat/ {
proxy_pass http://backend;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection $connection_upgrade;
proxy_read_timeout 10m;
}
The timeout should exceed the maximum expected heartbeat interval, with margin for scheduling and network jitter. A long timeout does not replace application-level liveness detection: use ping/pong handling and close dead sessions so abandoned connections do not accumulate.
Retries: why one timeout can become several upstream attempts
proxy_next_upstream defaults to error timeout. When an eligible connection, request-transmission, response-header or timeout error occurs, Nginx may pass the request to another server in the upstream group, provided it has not already sent a response to the client.
Rank #4
- Digital Family Calendar: BSIMB digital calendar wall touch screen puts an end to your chaotic life. Designed for busy families, the digital calendar keeps you organised and in step with your family. Assign different colours and tasks to each family member to make family scheduling easier and more intuitive.
- Easy Setup and Auto-Sync: Plug in, connect to WLAN and auto-syn your electric calendar in minutes. Digital wall calendar compatible with Google calendar, iCloud calendar, Outlook calendar, Cozi calendar and Yahoo calendar. Add events directly on the device or through the ecalendar app. Electronic calendar stays current whether you're at work or traveling—no manual updates needed.
- All-In-One Home Assistant: Smart calendar builds habits and encourage independence with personalised chores. Display daily meal plan to reduce the daily ‘What's for dinner?’ stress. To-do lists keep track of everything you want. Turning chores into valuable achievements with stars and rewards, making life easier and more enjoyable.
- Manage Anytime Anywhere: BSIMB electronic calendar for family stay connected with the powerful ecalendar app. Access and manage your digital wall calendar anytime, anywhere with free features like stars & rewards, photo screensaver, chore charts, meals plans, to-do lists etc. Electronic planner paid features like Magic Import tailor advanced tools for users with special needs.
- Stay in Touch with Loved Ones: Share photos or videos from your phone to electronic wall calendar with app, instantly update your life moment, and keep in touch with your family, especially those who are far away; you can also surprise your smart calendar digital wall by sending him a wish card; it's also great for keeping tech-illiterate elders in touch with the youngsters.
Retries can improve availability, but they can also hide the first failure, multiply backend work and consume the remaining capacity of healthy servers. Bound them with:
proxy_next_upstream_timeoutto limit the total time spent retrying.proxy_next_upstream_triesto limit the number of attempts.
Be especially careful with non-idempotent operations. Nginx does not normally retry methods such as POST after the request has been sent unless non_idempotent is enabled. Retrying a payment, order, or other state-changing request can duplicate work unless the application has idempotency protection.
Passive failure marking and a one-server trap
In an upstream group, the documented passive-failure defaults are max_fails=1 and fail_timeout=10s. Repeated unsuccessful attempts can therefore cause Nginx to treat a server as temporarily unavailable for the fail-timeout period.
Recommended Free Tools
These settings matter only when there are multiple servers to choose from. Nginx’s HTTP health-check guidance notes that a single-server group ignores the passive marking parameters. A lone backend therefore needs direct availability, capacity and process monitoring; changing max_fails cannot create a second place to send traffic.
For Nginx Plus active health checks, the documented defaults include a five-second check interval and an acceptable HTTP response range of 200–399. Those checks are separate from the passive behavior triggered by live client requests.
Best Value
A safe diagnostic workflow
- Capture the complete error. Save the timestamp, request path, upstream address and the entire suffix after “upstream timed out (110).” The suffix determines which timer and test apply.
- Confirm the client result. A 504 generally means Nginx abandoned its wait for the upstream. Record whether the client or an outer load balancer has an even shorter deadline.
- Inspect the active configuration. Run
nginx -Tand find the effectiveproxy_connect_timeout,proxy_send_timeout,proxy_read_timeoutand retry directives in the applicablehttp,serverorlocationcontext. A more specific location can override a value you changed elsewhere. - Correlate logs. Match Nginx access-log entries with backend logs and traces. If configured, compare
$upstream_connect_time,$upstream_header_timeand$upstream_response_time. - Test every upstream address. Resolve the name from the Nginx host and test TCP connectivity to each returned address and port. Do not test only the server that happened to work once.
- Check capacity. Examine worker availability, queue depth, CPU, memory, database latency, connection pools and kernel listen/backlog pressure.
- Look for retries. Comma-separated upstream timing values can indicate attempts across multiple servers. A single client request may have consumed time on more than one backend.
- Make one targeted change. Correct the address or route, restore the listener, optimize the slow operation, or adjust the smallest relevant timeout. Avoid changing all three proxy timers at once.
- Validate before reload. Run
nginx -t, then reload and inspect the error log for confirmation. Keep the previous configuration available for rollback.
Why nginx -s reload may not apply a timeout change
If the old behavior continues after a reload command, verify that the reload actually succeeded and that the edited file is the one loaded by the running master process. Maxim Dounin summarized this situation as: “This suggests that reload wasn’t successful for some reason.”
- Run
nginx -tagainst the active configuration and fix every syntax or file-path error. - Check the reload command’s exit status and the Nginx error log.
- Run
nginx -Tafter the reload to confirm that the new directive and value appear in the loaded configuration. - Confirm that the request reaches the
serverandlocationblock you edited; another block may have a more specific setting. - Verify that an outer proxy, load balancer or application client is not enforcing a shorter timeout.
A successful syntax test alone does not prove that the running worker processes adopted the change; the reload log and effective configuration do.
Example: a bounded slow-report endpoint
The following configuration deliberately allows a report operation more time to produce headers while bounding retries. The numbers are an example, not universal recommendations; set them from measured latency and capacity.
location /reports/ {
proxy_pass http://reports_backend;
proxy_connect_timeout 10s;
proxy_send_timeout 30s;
proxy_read_timeout 180s;
proxy_next_upstream error timeout;
proxy_next_upstream_timeout 20s;
proxy_next_upstream_tries 2;
}
Here the 180-second read timer is still an idle timer. A backend that sends no headers for 181 seconds will fail, while a response that periodically sends bytes can continue longer. The 20-second retry budget can also end before the nominal 180-second operation budget if an upstream failure causes retries.
Quick Recap
Choosing the right fix instead of just raising a timeout
| Observed evidence | Preferred action | When a timeout change is reasonable |
|---|---|---|
| Connection fails for one address or port. | Correct DNS, routing, firewall, listener or TLS configuration. | Only after measured handshake latency is the cause. |
| Requests wait in an application or database queue. | Increase worker or database capacity, optimize the operation, or queue the job. | When the operation is expected and capacity can hold waiting connections. |
| Large uploads pause because the backend stops reading. | Fix receive behavior, buffering, congestion or saturation. | When pauses are known and bounded. |
| Streaming sends regular data but has occasional longer gaps. | Implement heartbeats and align the idle timer with the heartbeat interval. | When the stream is intentional and resource limits are understood. |
| One backend fails and requests retry repeatedly. | Bound retry time and count; repair or remove the failed server. | Only with idempotency and sufficient spare capacity. |
Operational checklist
- Record the exact error suffix and timestamp.
- Identify whether the stall was connect, send, header read or body read.
- Check effective configuration with
nginx -T, not only the file you edited. - Measure upstream connect, header and response timing.
- Test DNS and TCP reachability from the Nginx host.
- Inspect worker pools, queues, databases, CPU, memory and listen/backlog pressure.
- Account for retries and whether the request is idempotent.
- Use heartbeats for intentionally quiet WebSocket or streaming connections.
- Run
nginx -tbefore reload and verify the reload in the log. - Change one relevant setting at a time and watch 504 rate, latency and resource usage.
Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.




