Support setting shard timeout

Closes #528