What happens when the connection limit is reached?
Short answer
It depends on which limit is reached. When Max. Total Connections or the per-second rate limits in the vService Limits profile are reached, new connections are not rejected; they are held until the value falls below the limit; existing connections are not cut off and the user sees slowness (effects and behavior). When the Connection Limit on the Backend Service is reached, requests go to the other servers; in HTTP and L7 TCP vServices, if all servers are full, they wait in the queue, and if Queue Timeout is exceeded, the client receives 503. In Network vService there is no queue; while Port Range is on or the protocol is ANY, Connection Limit is not applied.
How Does It Work?
In TR7, there are two separate layers of connection limits: vService Limits limits the client connections coming to the vService, while Connection limit limits the concurrent connections going to each Backend Service server.
| Limit | Where | When reached |
|---|---|---|
| Max. Total Connections | vService Limits | New connections are held until one of the existing ones closes |
| Max. New Connecions/s, Max. Connections/s, Max. Session Rate/s | vService Limits | New connections are held until the rate falls below the limit (connection rate) |
| Max. Total SSL Connections, Max. SSL Connections/s | vService Limits | New encrypted connections are limited (SSL connection limits) |
| Connection Limit | Backend Service → Details | The request goes to the other servers; in HTTP and L7 TCP, if all are full, it enters the queue, and if the Queue timeout (default 60 s) is exceeded, 503 |
In vService Limits, the defaults are applied even if no profile is assigned (What is the vService Limits profile; what are the default limits?). If Connection limit is left empty, the server connection count is not limited and no queue forms.
Seeing and Resolving the Reached Limit in TR7
- Live Stats: In the Frontend section of Live Stats, the tooltip of the Current Sessions card shows the peak value and the defined upper limit; the Queued Requests card shows the requests in the queue.
- Backend Services dashboard: The Queue Depth chart shows the Backend Service queue.
- Debug mode logs: While the HTTP vService is in Debug mode, the queue stage appears in the Termination State value of requests whose time runs out in the queue.
- If caused by vService Limits: A profile with higher values is created with Load Balancer → Profiles → vService Limits → Add (how to add), selected in the Details → vService Limits box of the vService, and Save is clicked (how to add to a vService). A change to Max. connections/s, Max. Session Rate/s, the two SSL fields and Buffer size(kB) restarts the vService and open connections drop; Max. Total Connections, Max. Failed Connection Retries and Max. New Connecions/s are applied without interruption.
- If caused by Connection limit: The Connection limit value of the Backend Service is increased or a new server is added (What is Connection Limit; what happens to new requests when the limit is reached?).
- WEB-CLI: The profile is created with
lb limits add name portal-sinirlari --maxConn 50000and bound withlb service update id <vService> --poolLimits portal-sinirlari(limits examples). - Cluster: Profile and vService changes are also sent to the peer device with the default auto-sync; if Manual Sync Mode is on, they are sent with Synchronize.
Common Misconceptions
- "When the limit is reached, TR7 shows an error page." When vService Limits is reached, connections are held; 503 occurs when Connection limit is reached and the Queue timeout is exceeded in the queue.
- "When the queue is full, the Backup service takes effect." The Backup service takes effect only when the main servers cannot be used; reaching the limit is not this situation.
- "When the limit is reached, existing connections are cut off." Active connections are not affected.
How it is done in the documentation
