Post
Topic
Board Mining software (miners)
Re: hashkill - testing bitcoin miner plugin
by
Gary13579
on 21/06/2011, 23:28:21 UTC
Hey guys, I've figured out an edge case bug on some networks which can cause a very large amount of stale shares, up to 30%. The problem is that hashkill uses curl to open a connection to the longpolling server, and it idles on that connection until a new block is available. This is fine and dandy, but a lot of networks and firewalls will kill a connection if it has been idle for a certain amount of time. This was set to 10 minutes on my network. This meant that every time a block went for longer than 10 minutes, longpolling would break and you'd submit a bunch of stale shares not knowing they are stale.

A fix for this should be coming in hashkill as it's a very simple thing to fix, ~5 lines of code. Until then you can run the following command to fix it (note that it must be ran as root):

[root@snuggles]# echo "300" > /proc/sys/net/ipv4/tcp_keepalive_time

This sets the keepalive time to be 5 minutes, which means every 5 minutes, your Linux box will send an empty packet to the server which keeps the connection alive. Adjust this value based on your network/firewall configuration.