Not sure why, but got those "force reconnect if possible!" errors.
Found a post by xolokram @ peercointalk that says:
"the typical behaviour for the miner when the connection is lost is to continue mining for 5 minutes (this is when the "force reconnect if possible!" log line appears) and when a thread finds a share during this period, the thread waits until the connection is back again to submit it. unfortunately the triggers are not always working correctly (the current implementation is a bit 'clunky' regarding connection loss) and a thread continues mining forever on the old block. especially when you have unstable connections or partly blocked connections or any behaviour that's far off from (let's say) "normal".
http://www.peercointalk.org/index.php?topic=501.240I've just made a simple software watchdog that restarts ptsminer if detects a "force reconnect" error. Just change the folder, pooluser and genproclimit to mine @ beer pool.
Edit: Added proper process killing with Ctrl-C and move old log to ~/ptsminer.log.old
#!/bin/bash
#Tips welcome :) PYfnvSc9CRHCebGDtVkSijo6k7pCbpPthX
function launchptsminer {
echo "######## Starting ptsminer... ########"
cd ~/src/ptsminer/src/
./ptsminer -poolip=ptsmine.beeeeer.org -poolport=1337 -poolpassword=0 -pooluser=PYfnvSc9CRHCebGDtVkSijo6k7pCbpPthX -genproclimit=4 > ~/ptsminer.log &
}
control_c()
{
echo "######## Stopping ########"
ps aux | grep tail | grep ptsminer | awk '{print "kill "$2}' | sh
killall ptsminer
exit 0
}
trap control_c SIGINT
mv ~/ptsminer.log ~/ptsminer.log.old 2> /dev/null
launchptsminer
tail -f ~/ptsminer.log &
while true
do
grep "force reconnect" ~/ptsminer.log
if [ $? -eq 0 ]
then
echo "######## Force reconnect DETECTED ########"
echo "######## Killing ptsminer... ########"
killall ptsminer
echo "######## Wait 5 secs... ########"
sleep 5s
launchptsminer
fi
sleep 1s
done