What will happen to the request being transmitted at the moment of configuration reload

📅 October 12, 2026 👁️ 29

At the moment of configuration reload, will the requests being transmitted be directly cut off? By default, they will not. The difference between reload (reload) and restart (restart) is here: during reload, the main process does not exit, it starts up a batch of new worker processes according to the new configuration, hands over the new connections to them, and at the same time, allows the old worker processes to enter the exit process—the old processes no longer accept new connections, but will continue to handle the established connections until these connections end on their own.So short requests and long requests are safe in the moment of overload. The only case where they will be cut off is when you set an exit time limit for the old process, and once the time limit is reached, the process will try to close all currently open connections to end itself.

Which type of connection does the exit time limit control

This instruction is quite direct in the nginx core module documentation: worker_shutdown_timeout is the configuration limit for the graceful shutdown of worker processes, after the time limit expires, nginx will attempt to close all currently open connections to complete the exit;This command was introduced from version 1.11.11, the scope is the main configuration layer. Note that it manages objects - already established connections, not new requests.The default value is not set, which means allowing the old process to wait until all connections naturally end. This default value itself explains the trade-off: no time limit is set, and the exit time is uncontrollable;Set a time limit, and the requests in transmission will bear the cost of being cut off.

Which scenarios will be affected by the time limit

The three types are the most typical. Large file upload: a single transfer may take tens of seconds or more, the time limit is shorter than the transfer time, and the user sees the upload fail halfway through, and retries will collide with the next round of reloading. Long connections and streaming responses: the purpose of connections like server push and event stream is to maintain them for a long time, and any time limit will actively cut them off. Queue-type task interface: the request itself takes a long time to process, and after the timeout is cut off, the client cannot know whether the server has completed the processing, and it is easy to submit duplicates. On the contrary, almost unaffected are the short requests that break off in a flash and the idle connections that have completed the response.

What are the consequences of setting it too short and too long

The consequence of a very short time limit is a perceptible failure: the connection is forcibly closed, the client appears to be interrupted, and no clear reason can be seen in the logs because this is an action executed according to design.The consequences of a too long time limit or not setting one are more concealed: the old work process lingers for a long time, the memory usage does not decrease, and the old and new configurations coexist at the same time - the flow control threshold, cache rules, and certificates are inconsistent in the two groups of processes, and when troubleshooting, looking at the same configuration, two different behaviors are obtained.This is particularly worth noting for memory-sensitive scenarios, the memory usage of the Go technology stack site itself is about 80% lower than that of PHP-like programs, and the additional usage of the滞留进程processes is therefore more obvious in the overall cost;The page loading speed is directly related to whether it can stably bear the load of about 5 million PV levels on a single machine, and the optimization of the new configuration will take effect completely in the next round when the old process has not been cleaned up completely.The reasonable approach is to set the time limit slightly longer than the normal longest request time in the business and avoid frequent reloads within the change window.

What is the verification method after the modification

First, perform grammar and configuration checks to confirm that the new configuration can be loaded; then perform a reload instead of a restart to retain ongoing transfers. After the reload, confirm three things: the new work process has started accepting tasks according to the new configuration;The old process is in the exit state and the number is decreasing; if an exit time limit is set, observe whether it reaches zero at the expected time. Also note one thing when deploying with Docker images: the process signals in the container must be able to reach the main process, and the reload action will be effective; directly rebuilding the container is considered a restart, which will cut off all connections, and it is not the same as a reload.AnQiCMS (AnQi CMS) listens on the default port 8001, and after the reverse proxy configuration is changed, it should be verified in the same order: first check the configuration, then reload, and then confirm from outside that the new rules are effective and that old requests have not been interrupted.

Common questions

Question: Which one should be chosen, reload or restart?Answer: Choose reload if only the configuration content is changed, and choose restart if it is necessary to reload the program itself. Reload retains the connections in transmission, while restart does not.

Question: How can you tell if the old process is still alive?Answer: Look at the number of working processes. It is a normal phenomenon for the number of processes to briefly appear twice after a reload, and then fall back to one batch; if it does not fall back for a long time, it means that there are still connections that have not ended.

Question: Should a timeout be set for long connection business?Answer: Make it wider or not set. This type of connection does not have a natural end time, the short limit is equal to regular interruptions, unless you have a clear switching window.

Related articles

Under the same repair date, there are two announcements with different reporting dates hanging, and follow-up should be arranged according to which time.

Under the same fix date, there are two announcements with different reporting dates. The follow-up is arranged according to the fix date, not the reporting date. The fix date represents the actual release of the patch with which version, which is the day you can start working; the reporting date only indicates the time when the vulnerability was notified, used to estimate how long the exposure window is; the announcement release date is the time when the public information is released, usually not earlier than the fix date. Taking two core announcements of the Joomla Security Center as an example, the reporting dates are August 19th and August 2nd, respectively, and the fix dates are both September 25th, and the affected range and upgrade target version are also consistent.

2026-10-12

The cause of the core announcement is writing the built-in third-party library, in addition to waiting for the patch, the station also needs to look at which part

The cause is written in the core announcement of the built-in third-party library, the vulnerability is not in the code written by the station itself, but it is distributed with the core, so it cannot be avoided by changing your own template or business code, and can only follow the core version. When following up, read three sections: the upper and lower bounds of the affected range determine whether your version is hit, the fixed version determines which version to upgrade to, and the rating and exploitation conditions determine the priority of scheduling. Taking the Drupal announcement SA-CORE-2026-013 as an example, the affected range spans three branches, and the fixes are in the latest version of each branch.

2026-10-12

Why would the entry be lost and keep getting bigger when writing the intercept list to a file?

Write the login intercept list to a single file, and it is easy to lose entries under concurrent writing: two requests read the same content at the same time, append it separately, and write it back, the one written later covers the previous one, and the addresses blocked are thus removed from the list. A file without a capacity limit will continue to grow, and the time for reading and parsing will also increase; irregular malformed entries will cause parsing errors directly, leading to the overall failure of the list. The list is just a layer, and the server still needs to have independent verification and captcha links.

2026-10-12

Why should the database script in the online upgrade be arranged in version order, and what should be done if it fails halfway

The database script for the online upgrade must be executed strictly in the order of version numbers, as each script is based on the premise that 'the previous one has been completed': the new field has not been created, and the next one will fail when writing values. Skipping intermediate versions during cross-version upgrade will leave the table structure halfway. If the script fails halfway, the safe approach is to stop immediately and leave a log, rather than ignoring the error and continuing to run the remaining scripts, otherwise the problem will be covered by the subsequent scripts. Make a backup of data and static files before the upgrade, and check each section after the upgrade.

2026-10-12

When filtering content by custom field, the condition fails and returns all data, which layer to check first

When filtering content by custom fields, the condition fails and returns all data. First, check if the condition has truly entered the query, not the data. The judgment sequence is three layers: whether the field name and available range are allowed to participate in filtering; whether the matching method magnifies the short value to hit the long value; whether the cache has reused the previous result without conditions. The same type of problem was fixed in one go in the update records of the same program PbootCMS V3.2.20, including the failure of the extended field filter to return unfiltered full data, the error when using the extended field condition on the front end, and the magnification of the matching range caused by the short value hitting the long value.

2026-10-12

AI crawlers need to differentiate between search, proxy, and training uses, how to grant authorization for sites separately

AI web crawlers are divided into three categories based on their use: search crawlers build indexes and recommend traffic, proxy crawlers retrieve pages and access that can be traced back to individuals, and training crawlers replicate corpora in bulk and rarely revisit. The income differences between the three categories are very large, and leaving only one pass switch will put the content that is willing to trade copyright for citations and the objects that only want to copy the corpus together. The practice of authorizing sites separately is a three-tiered collaboration: Robots.txt expresses crawling intentions according to purpose, anti-crawling interference codes protect the text on the content side, and llms.txt indicates which content is welcome for model reading.

2026-10-12

Training type crawling accounts for the majority, why is there such a big difference between the crawling volume and the citation volume?

The amount of AI scraping and actual citations is significantly different, mainly because nearly 80% of the scraping is for training: this type of request copies the corpus without generating a revisit. The scraping that brings citations is search and Q&A. Looking at the ratio of scraping to citations, Anthropic is nearly 50,000 to 1, OpenAI is 887 to 1, Perplexity is 118 to 1, the gap depends on whether the source link is included in the answer. The investment of content sites should be in structures that can be cited, rather than chasing the amount of scraping.

2026-10-12

What does this new mode of pay-per-crawl mean for content sites in terms of AI content crawling?

Whether AI content crawling is charged depends on whether the crawling purpose brings equal value to the site: Search crawling that refers back to visits is usually free to pass, and training class that batches copies of language materials has a charging discussion. Pay-per-crawl turns the authorization negotiation into a technical switch - the crawling party pays for each page taken, and the site decides to pass based on the purpose. For content sites, it means three things: there is no billing without distinguishing the purpose, lists and agreements are two sets of control surfaces, and pricing and settlement still rely on manual process as a safety net.

2026-10-12