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
samsonsamson 

Apex call out side webservice time out in first time

Following in what I am experiencing:

 

1. Bind a visual page  action with an method in Apex controler to trigger it when page load.

 

2. In the that Apex method, I call an outside webservice. But it always end with time out when run in first time, it will work well after that. 

 

3. I've already set the timeout_x =12000

 

Notes: Actually, in the first time, the web service was called successfully but the code after the Webservice call will not be excuted due to time out

 

Anyone have the similar experience? any advise or discussion will be appreciated!  

 

XactiumBenXactiumBen

I had similar problems with this - got a 'Read Time Out' Error every so often but not all of the time.  In my case I just wanted to show my web service results on the page so I just set up an automatic apex scheduler that called my web service every so often (I set it up for every 6 hours) then saved my results into a custom object.

 

My visualforce page then queries my custom object instead of going to the web service so that if any errors do occur the user doesn't see them.

Dan123Dan123

I am having the exact same problem. After calling a .NET web service from a Visual Force page I receive a timeout the first time. After the first time it seems to work just fine.  Also seeing the same issue you pointed out that the webservice was called successfully the first time but was not executed in the alotted time.

 

Was wondering if you found an answer to your issue?

 

Thank you, Dan