Taken from the HttpClient documentation :
The default value is 100,000 milliseconds (100 seconds).
A Domain Name System (DNS) query can take up to 15 seconds or a timeout. If your request contains a host name that requires and you set Timeout to less than 15 seconds, it may take 15 seconds or more before WebException is sent to indicate a timeout for your request.
and as ZombieSheep notes, 5 seconds is not enough even to complete the DNS query.
I would also suggest deleting the timeout, and let this be the default value, since from what I know, the only way to "check" if the task did not stop is to assume that if you pinged the server, and it is responsible for connection, still OK and working / uploading file.
source share