We are calling apex remote method from User Interface. Sometimes this remote call is failing and below error is throwing on console.
unable to connect to the server (transaction aborted : timeout)
- We have inspected N/w panel for failed request, everything in the header seems fine
- On N/w tab, we see failed request reached 120 second time and as per Execution Governors and Limits - Maximum cumulative timeout for all callouts (HTTP requests or Web services calls) in a transaction. If this is the case, what should be probable approach to resolve this.
- We are calling apex remote method 5 times below simultaneously, it can be called even 30 times simultaneously based on element id of parent. If parent have 30 element id's we are firing 30 apex remote calls to same method simultaneously.
We have search google for this timeout issue but did not find any solution that helped us.
Any insights will be highly appreciated. Let me know if any other information is required.
2 Answers
Answers 1
I think its bcoz of ur server's late response, the remoting request is timed out.You can try setting timeout value (in Milliseconds)
Visualforce.remoting.timeout = 120000;
Before calling method Visualforce.remoting.Manager.invokeAction().You can even increase the timeout value if needed.
Answers 2
I think you need to post more code to get better answers. Have you tried to use non-batched requests. Set { buffer: false } in your remoting request configuration block.
Also, I know you said you've already tried increasing the timeout, be sure that when you set these options, they're actually sticking and being used when the remote call is made.
Also, there are two different syntaxes for JavaScript Remoting in Visualforce. Which one are you using? Have you tried both?
https://developer.salesforce.com/docs/atlas.en-us.pages.meta/pages/pages_js_remoting_limits.htm
0 comments:
Post a Comment