DaemonManager: process limit reached
I've left the service based on this library running for a while in TCP socket mode, and I got this error:
Sep 21 06:36:21 url-milter2 php[62519]: milter.php[62519]: [DaemonManager: process limit reached]
Sep 21 06:36:21 url-milter2 milter.php[62519]: [DaemonManager: process limit reached]
Sep 21 06:36:21 url-milter2 php[62519]: milter.php[62519]: [DaemonManager: process limit reached]
Sep 21 06:36:21 url-milter2 milter.php[62519]: [DaemonManager: process limit reached]
Sep 21 06:36:22 url-milter2 php[62519]: milter.php[62519]: [DaemonManager: process limit reached]
Sep 21 06:36:22 url-milter2 milter.php[62519]: [DaemonManager: process limit reached]
Sep 21 06:36:23 url-milter2 php[62519]: milter.php[62519]: [DaemonManager: process limit reached]
Sep 21 06:36:23 url-milter2 milter.php[62519]: [DaemonManager: process limit reached]
After this, the error repeats indefinitely.
The process limit is set to 1024 in the code. According to my haproxy the number of concurrent connections on this server never exceeeded 47.
I'm looking at the code and I'm uncertain if maybe dead child processes are ever removed from $this->processList, which means that the original daemon holding the TCP socket forks until it has made 1024 child processes and then it just yields this error until restarted. This is consistent with what I have observed and I doubt this is the intended behaviour.
I'd like to ask whether keeping the $this->processList is strictly necessary as this and the pid file for example, can be managed more effectively using systemd.