Cyber Week: a free onboarding call with every new server, until 7 December. See plans
VICIfast
ENES
Operations

A whole office behind one IP: the keep-alive setting that failed 1 in 10 connections

An office floor behind one public address saw 1 in 10 new connections to its VICIdial web server fail on the first try. Here's why, and the change that took it to zero.

VICIfast Support
··4 min read
A modern call-centre office — illustration for: A whole office behind one IP: the keep-alive setting that failed 1 in 10 connections
Photo by Pavel Danilyuk on Pexels

The office's IT team says about 15% of connections to your VICIdial server are failing. Is it the server, the firewall or their network? On one office floor we run, the cause was a web-server setting that suits almost every floor and was wrong for this one: every agent sat behind a single public address.

What a one-minute capture showed

We captured the traffic between that office and the web server for a minute. 2,364 new connections arrived from the office's one address. 212 of them, about 9% or 1 in 10, were refused on the first try and came back about a second later.

So the office's number was in the right area. The connections weren't failing for good, but each one cost a retry and a second of waiting.

Why so many new connections? Each agent screen polls the web server once a second for updates, and on one floor we measured that polling made up 87.5% of web requests. Each browser can hold as many as 6 connections to a server at once, and a whole floor of browsers was opening them through one address.

Why one shared address got refused

Every server we build runs Apache with KeepAliveTimeout 1: a connection that sits idle for a second is closed. That keeps web workers free, but it means the server, not the browser, closes nearly every connection. A server that closes a connection has to remember it for a while. On this floor it was holding about 1,600 of the office's address-and-port pairs.

The office router puts every PC behind one public address and reuses ports through it, the same address sharing that NAT traversal deals with on the audio side. About 1 in 10 new connections landed on a pair the server still remembered, and was refused. The browser tried again a second later and got in.

flowchart LR
  A[54 agent screens] --> B[Office router, one public address]
  B --> C[New connection on a reused port]
  C --> D{Port pair still remembered?}
  D -- no, about 9 in 10 --> E[Accepted]
  D -- yes, about 1 in 10 --> F[Refused]
  F --> G[Browser retries a second later]
  G --> E
  E --> H[Idle 1 s, server closes it]
  H --> I[Server remembers the pair]
  I --> D

A floor of Remote agent home workers, each on their own address, doesn't run into this. Only floors with many agents behind one address do.

The change, and what it cost

On that floor we set KeepAliveTimeout 15 with MaxKeepAliveRequests 1000. Browsers now reused their open connections instead of opening fresh ones, so the server stopped closing them every second.

Measured on the office floorBeforeAfter
New connections a minute from the office2,364about 142
Refused on the first try, per minute2120
Office address-and-port pairs the server rememberedabout 1,600about 40

The bill came in web workers. An open connection holds a worker while it waits, so the floor rose to about 210 to 310 busy workers, about 5.7 per agent at 54 agents.

That's why 15 seconds isn't our default. With Ubuntu's stock 5-second keep-alive we've seen 8 agents fill a server's 48 workers. Before you lengthen keep-alive, make sure your worker cap has room; ours are set to 40 per CPU core.

This was the same office whose router left hundreds of dead connections open and froze every screen at once. That story, about Apache's Timeout, is in agent screens freezing every ten minutes.

Before you touch it on your floor

Measure first. Count new connections a minute from the office's address, and how many are refused and tried again a second later. If that count is near zero, leave the 1-second setting alone.

Keep the screen and the phone apart in your head. This was web traffic, the screen's polling. The phone inside the screen, such as our branded webphone, handles its Phone registration with the dialer separately, over a secure WebSocket on port 8089. If phones are dropping too, check whether each drop is real or a logout as a separate question.

Change keep-alive after the shift, not during it. On that floor an Apache reload mid-shift froze every screen for roughly 20 seconds, and the agent page needed 7.3 seconds to come up.

A shared office line causes more than retries. The VICIdial call quality guide maps the other faults it can cause, from choppy audio to agents logged out as LAGGED.

Frequently asked

› Should every VICIdial server get a longer keep-alive?
No. We keep 1 second on every server we build and raised it to 15 only on an office floor with every agent behind one address, after counting first-try failures.
› Why does an office see refused connections when home agents don't?
The office router shares one public address and reuses its ports, so new connections can land on a pair the server still remembers as closed. Home agents each arrive from their own address.

Every server we run starts with KeepAliveTimeout 1 and worker caps sized per core, and a VICIdial engineer answers support and will go through the connection numbers with you before anything changes. Start on a plan, or try a server free for 7 days first.

About VICIfast

We run VICIdial servers for call centres, so you don’t have to. You get the dialer set up, secured and kept running — we handle the server, the updates and the backups. Bring your own phone carrier at no markup, or use VICIfast Voice, our own US calling and numbers, from $0.0085 a minute. From $49 a month per server.

Questions? Call +1 636 556 0022 and talk to someone who runs dialers.

Citing this article

VICIfast Engineering. “A whole office behind one IP: the keep-alive setting that failed 1 in 10 connections”. VICIfast LLC, December 1, 2026. Retrieved from https://vicifast.com/blog/vicidial-one-office-ip-keepalive-retries

Have questions?

Related posts

You might be interested in

Comments

Comments are reviewed before they appear. We never publish your email.

No comments yet - be the first.