function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Jeff777Jeff777 

System.CalloutException: Read timed out --- HTTP class

I am using HTTP class to post a xml file to a site, and everything works well but getting this error message "System.CalloutException: Read timed out" at res = http.send(req); at the first try of the day, then I won't see this message again. If I am not running the code for quite a while, then it may come up again, is there anybody experiencing the same thing?

 

Thanks,

 

 

req.setEndpoint(url);

...

res = http.send(req);

res = http.send(req);

aalbertaalbert

The read time out error is stating that the Send() method did not return an HTTPResponse within the timeout interval. Can you debug the web service to see if the message was received? How long it took?

 

You can configure the timeout too.  Link

Jeff777Jeff777

After I set Timeout to 1 min today, I didn't see that error. Since this happened only once usually in  a day, I would think now it solves the problem. I will give an update if otherwise.

 

Thanks!