By Greg Nowak. Updated 18 November 2026.
Before upgrading NGINX, find out which applications depend on its current connection behaviour. NGINX 1.30 reuses connections to HTTP backends by default, which can reduce repeated connection setup. The review matters most where an agency manages inherited configurations, an internal application has unusual authentication, or a vendor controls the backend.
For business owners and operations leads, the useful outcome is a short list of affected applications, tested customer journeys and a clear rollback decision. Your technical team can use the checks below to get there.
What changes with upstream connection reuse?
The defaults arrived in mainline 1.29.7 and carried into NGINX 1.30: HTTP proxying uses HTTP/1.1, the default upstream Connection header is cleared, and upstream keepalive caching is enabled. The NGINX announcement explains why older instructions explicitly enabling these features are now redundant.
This concerns the connection from NGINX to an HTTP application. It does not select the protocol used by a visitor’s browser, and proxy_http_version does not configure PHP-FPM through fastcgi_pass.
The default cache is equivalent to keepalive 32 local;. That means up to 32 idle cached connections per worker, with reuse separated by location. It is not a limit on active connections or total backend capacity.
Which applications need the closest review?
| What you have | First action | Acceptance check |
|---|---|---|
| Modern HTTP application | Test the defaults | Normal journeys and backend capacity remain healthy |
| Legacy or vendor application | Confirm supported behaviour | Login, uploads and requests after idle periods pass |
| NTLM or Negotiate authentication | Review connection binding | Concurrent users retain the correct identity |
| Explicit keepalive directive | Review location sharing | Reuse matches the intended application boundaries |
| Shared agency configuration | Map includes to client sites | Every affected application has a test owner |
Audit the configuration your service actually uses
Run these checks with the same NGINX executable and configuration path as the deployed service. Containers, custom builds and service arguments can point somewhere different from your shell’s default:
sudo nginx -V
sudo nginx -T 2>&1 | grep -nE 'proxy_pass|proxy_http_version|proxy_set_header[[:space:]]+Connection|keepalive|ntlm'
sudo nginx -tThe command-line documentation confirms that -V reports the version and build options, -T tests and dumps configuration files, and -t checks configuration syntax and referenced files. A passing configuration test does not establish application compatibility. Keep configuration dumps private.
Use the search to find candidates, then inspect their complete blocks and included files. Record the backend, application owner and critical journeys for each route.
Check header inheritance carefully: defining any proxy_set_header at a level prevents inheritance of the parent’s entire set. Adding one exception can therefore drop inherited host or forwarding headers. This rule is documented in the HTTP proxy module reference.
Test user journeys, including the awkward pauses
Start with the actions that keep the business running: sign-in, checkout or form submission, administrative changes and uploads. Repeat them with concurrent users and after an idle period. A successful homepage request tells you little about these paths.
For NTLM or connection-bound Negotiate authentication, verify identity isolation as well as successful login. General connection reuse does not establish client-to-upstream binding; NGINX’s documented ntlm directive is a commercial feature.
If 502 or 504 errors appear, use the timestamp, affected route, NGINX error log and backend logs together. A 502 points broadly to an upstream communication or response problem; a 504 indicates a gateway timeout. Neither proves that keepalive caused it.
A log entry saying upstream prematurely closed connection also needs context. Investigate backend restarts, application failures and connection handling. An upstream timed out message calls for checking the operation being attempted, load, network behaviour and configured timeouts. Avoid increasing timeouts or enabling broader retries without understanding the failure, particularly for requests that change data.
Make targeted changes when evidence supports them
Keep existing proxy_http_version 1.1; and proxy_set_header Connection ""; lines during validation if they already work. Configuration cleanup can be a separate reviewed change.
An explicit keepalive 32; permits sharing cached connections across locations when the upstream address matches. Add local if location separation is intended. The upstream module reference documents this distinction and the default idle timeout of 60 seconds.
If failures consistently follow idle periods, compare timeout settings across NGINX, the backend and any intermediary. For a backend documented to close idle connections after 30 seconds, this is a reasonable configuration to test:
upstream application_backend {
server 127.0.0.1:8080;
keepalive 32 local;
keepalive_timeout 20s;
}The values are illustrative. A shorter upstream idle timeout can reduce exposure to stale connections; it does not establish the cause or guarantee a fix.
If a backend specifically requires HTTP/1.0 and closed connections, apply the documented fallback to its route:
location /legacy-app/ {
proxy_pass http://legacy_backend;
proxy_http_version 1.0;
proxy_set_header Connection "close";
}Preserve required headers, retest and record the exception’s owner and reason.
Agree on rollout evidence and a way back
Choose a maintained package and review the 1.30 changelog alongside your package vendor’s release notes. Before deployment, capture error rates, response times, authentication failures and backend connection counts. Test one representative application first, then expand while monitoring the same measures.
Name the person who can stop the rollout. Define a trigger, such as a failed critical journey or sustained error increase, and keep a tested package and configuration recovery path available.
If ownership is spread across hosting, developers and application vendors, Greg can help coordinate the upgrade, from the application inventory and test plan through deployment decisions and handover.
Related on GrN.dk
- Nginx 1.30 Changed Upstream Connections: What to Test Before You Upgrade
- Before You Buy a GPU: Test Your Team’s Local AI Workload
- HTTP/2 Is On. Why Does Your Website Still Stall Under Load?
Need help with this kind of work?
Plan your NGINX upgrade with Greg Get in touch with Greg.