You could try and increase the timeout setting as mentioned. Maybe 5 or 10 seconds. And you might have to see how large a chunk you would stream.
Also you could try and reduce the chunk size. Also you could disable fail on error which carries the risk that errors might get unnoticed.

Also you could check with your database if you could adapt the CONNECT_TIMEOUT and RETRY_COUNT (or a similar parameter) that could make the connection more stable.
