[squid-users] No buffer space available
Amos Jeffries
squid3 at treenet.co.nz
Wed Dec 7 16:37:20 UTC 2022
On 7/12/2022 9:24 pm, Craig Harrington wrote:
>
> My squid proxy has been running fine for over a year and over the last
> few weeks it has been failing randomly.
>
> I have been getting the following messages in the cache.log:
>
> comm_openex socket failure: (105) No buffer space available
>
> oldAccept FD 18, [::] [ job2]: (105) No buffer space available
>
That error "(105) No buffer space available" occurs when the __operating
system__ has run out of TCP sockets (too many connections) or network
stack memory (too much traffic volume).
FWIW; Windows is known to have quite low limit of 2000 concurrent TCP
sockets per process, making it quite sub-optimal to use for networking
services like Squid.
Since you have had it running previously, I suggest checking to see how
many connections Squid is actually using when the problem occurs.
If the number of sockets looks unexpectedly high check for a routing
loop forwarding traffic leaving Squid back into Squid again?
that type of self-DoS (and of course other types of DoS) are usually
what cause this error message to come up for Squid.
> Sometimes a restart of the service fixes and sometimes I need to reboot.
>
Hmm. That need for a full reboot hints that some other service on the
machine is consuming TCP resources.
If Squid were the cause of this the service restart would *always* fix
the problem.
It may just be the OS cannot handle two services putting "heavy" use on
TCP at the same time.
> Server is Windows 2019 running in AWS
>
> Squid is v4.14 from Diladele installer
>
> I have tried reducing TcpFinWait2Delay and TcpTimedWaitDelay.
>
For effective use of those settings check squid.conf to ensure you do
*not* have these:
client_persistent_connections off
serve_persistent_connections off
If they exist removing both (or at least the server one) may help reduce
the pressure on the OS resources.
One thing to be wary of since you reduced it - is that TcpTimedWaitDelay
should ideally be the same or larger than Squid
client_idle_pconn_timeout (default 2 minutes).
HTH
Amos
More information about the squid-users
mailing list