Synchronous request timed out
Hi Folks,
I am working on jquery mobile with Phonegap! I am having jquery ajax calls where in I am getting data and populating the UI. There is one URL which is taking 30 seconds to get the data. When I am hitting the url using ajax call, I am getting Synchronous request timed out error. The exact log I am seeing in my log is:
WebUrlLoaderClient(986): Synchronous request timed out after 10 seconds for the 2th try!
I tried to increase the timeout of the ajax call as shown below, but still I am getting the time out error as the ajax call is retrying for every 10 seconds, giving me the error- :
WebUrlLoaderClient(986): Synchronous request timed out after 10 seconds for the 2th try! It is trying for every 10 seconds and I see the same error 3 times and then the ajax call is getting into error block and I am getting
jqXHR.status as zero.
- $.ajax({
- url : promoURL,
- timeout: 90000,
- async: false,
- success : function(data) {
- returnValue = data;
- },
- error : function(jqXHR, exception) {
- var errorMessage = '';
- if (jqXHR.status === 0) {
- errorMessage = 'You are not connected, please verify your Network.';
- } else if (jqXHR.status == 404) {
- errorMessage = 'Requested page not found. [404]';
- } else if (jqXHR.status == 500) {
- errorMessage = 'Internal Server Error [500].';
- } else if (exception === 'parsererror') {
- errorMessage = 'Requested JSON parse failed.';
- } else if (exception === 'timeout') {
- errorMessage = 'Time out error has occured.';
- } else if (exception === 'abort') {
- errorMessage = 'Ajax request aborted.';
- }
- var errorObject = {
- "error" : [ {
- "code" : jqXHR.status,
- "description" : errorMessage
- } ]
- };
- returnValue = errorObject;
- }
- });
Thanks in advance.
Regards,
kumarjee Alluri