Might be an idea to ping riak server every 30minutes if there was no activity to keep the connection open forever or to detect an error'ed connection.
Test how much time it take to make a connection (to se if its worth it) and if a ping can keep the connection open forever.