TinyProxy

TinyProxy users may encounter a notice similar to the following in their logs:

NOTICE    Aug 18 10:34:00 [8368]: Waiting servers (0) is less than MinSpareServers (1). Creating new child.

That problem can cause TinyProxy to work extremely slow. You can find a solution to this problem in the further part of the article.

The Problem

Waiting servers (0) is less than MinSpareServers (1). Creating new child.

That TinyProxy notice says that waiting servers amount is less than MinSpareServers amount. What does that mean?

Waiting servers are active TinyProxy threads awaiting for connections from clients.

MinSpareServers is a minimal amount of TinyProxy threads that should be running.

In case of the above NOTICE message, TinyProxy says that there are 0 servers (threads) running, which is lower than the minimum of one. Those threads are being spawned and killed during work of the proxy server. When there are not many active threads running, in result all listening threads may get killed. In result we have this message, and a problem with our proxy. If there are no active listening threads, proxy will work terribly slow. The clients will have to wait until new threads are spawned.

Thankfully, the solution to this problem is very simple.

The Solution

To prevent a situation where all TinyProxy threads are killed, we should increase the minimal amount of listening threads – the MinSpareServers setting. We should increase the initial amount of spawned threads as well with StartServers setting.

Here is a setting that sets minimum amount of threads to 10, maximum to 20, and initial amount of threads to 10. This setting worked very well in my case:

MinSpareServers 10
MaxSpareServers 20
StartServers 10

Update those settings in your TinyProxy configuration and restart it.

I hope this helps!

I need your feedback

Did this solution worked for you? Let me and other readers know!