During the last 2 weeks I'm having an issue with mining. After I start the miner it works for about half an hour (sometimes even finds a block) but then it stops with a 'waiting for work' status. And stays like that for hours until I restart it. At the same time the wallet keeps receiving new blocks from the network.
When I press Q to stop the miner it sometimes restarts by itself and stops responding for any input.
I have tried to redownload the blockchain, generate a new wallet and upgrade to the latest version but it didn't help. Now I can't think of any particular reason to it because my PC configuration didn't change in any way since before the issue appeared. So I suppose it's somehow related to the network.
Maybe transactions became too rare and the miner just stops functioning if waiting for work for too long? But the diff stays around 18 which means someone is still mining.
It could be an issue with cgminer not seeing new work or stopping to grab new work. To confirm this, next time it happens, open the debug console on the wallet and type getwork. If you see a non-zero response then, there is work but cgminer isn't seeing it.
Also, tell me what OS you're running. If it is Windows, I just released a new cgminer-khc 3.7.8b with new DLLs for CURL and OpenSSL. Also, Is cgminer connecting to the Wallet on the same localhost or, it's connecting to one on a remote PC? Are you using SSL for RPC calls?
A couple a days ago, I wrote a Perl script that checks if there is work on the network every 2 seconds. If there isn't work, the script immediately sends 2 cents to one of my wallets. This will keep miners busy.