cdhowie / Bitcoin-mining-proxy

Multi-pool, multi-worker proxy for Bitcoin miners, supporting long polling and pool failover
GNU Affero General Public License v3.0
126 stars 70 forks source link

Apache Error #10

Open wibuf opened 13 years ago

wibuf commented 13 years ago

[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?

elitak commented 13 years ago

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?

cdhowie commented 13 years ago

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

elitak commented 13 years ago

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.