cdhowie/Bitcoin-mining-proxy

Apache Error

wibuf opened this issue · 3 comments

[warn] Server ran out of threads to serve requests. Consider raising the ThreadsPerChild setting

No error appears, all my miners quit connecting, so I checked the apache logs and that appeared. Any idea?

I have a similar problem. I've tried both apache2-mpm-prefork and lighttpd; they both run out of resources with which to serve requests. It appears that the php scripts are leaking a very high percentage of processes/threads. My current workaround is to restart apache every 20 mins :(

I'm at a loss on how to debug this further. I need some way to inspect where each instance of the running php scripts is stuck and try to determine why. Maybe a recent change caused a regression?

I can't reproduce this on apache2-mpm-prefork. I'm afraid there isn't much I can fix without further input.

I'm using deepbit as my upstream mining pool; it supports LP natively.

In the mpm_prefork settings, set the MaxClients to a low number (like 10) to get it to run out of processes faster. After letting some miners work through the mining-proxy for a while (or maybe even restarting them to generate lots of getwork requests), they'll use up all the procs holding php interpreters open. At that point, even the $ROOT/admin/ page will no longer load.