xmrigCC icon indicating copy to clipboard operation
xmrigCC copied to clipboard

Multiple daemons and miners running while daemon is installed as Windows Service

Open ariadarkkkis opened this issue 6 years ago • 5 comments

I use NSSM to create service. I have this problem on some servers that miner crash or something that I don't know, But it will start another daemon because its a service and that service runs daemon. So when miner crashes or pauses or being killed or something like that which I don't know exactly what the problem is, It will restart the service. So the problem is a daemon is already running and I don't know how but service will start again and starts another daemon while the old daemon is still running and runs another miner. but I can close it via task manager because it's not a part of that service anymore. I'm looking for a code inside xmrigCC to allow ONLY 1 xmrigDaemon and 1 xmrigMiner runs at the same time. I'm using windows and run miner on windows.

ariadarkkkis avatar May 01 '18 06:05 ariadarkkkis

anyone?

ariadarkkkis avatar Jun 12 '18 13:06 ariadarkkkis

yeah! that would be great to implement a restriction to allow only 1 instance running for the miner in windows os

chekamarue avatar Jun 12 '18 18:06 chekamarue

We definitely need that feature (only 1 running instance). And\or automatic miner shutdown if no daemon present, because miner doesn't start on it's own anyway, and new instance of daemon explicitly runs new miner instance even if there's already running one.

Another usecase is using task scheduler to run miner and automatically shutdown it when on battery. Now we will just endup woth multiple miner instances since only daemon will be shutdown.

Or ... why we won't just merge daemon and miner in one binary ?

electroape avatar Sep 02 '18 10:09 electroape

yea still waiting for @bendr0id to make some time for it

ariadarkkkis avatar Sep 02 '18 10:09 ariadarkkkis

This is not a feature which is wanted by everyone. There are a lot of users which run different miners on the same machine to mine different coins at the same time.

So it has to be a property which can be configured. And it has to be a solution which works for all platforms. But anyways i don't see it as a problem of the miner to keep track that there is only a single instance. It's your bad configured service which is making the trouble, not the miner/daemon. Per definition a windows service is running as a single instance. The only problem i can see is that the miners isn't dieing when the daemon is destroyed. So this is maybe a thing to look into.

Bendr0id avatar Sep 03 '18 17:09 Bendr0id