Synchronous request timed out

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.

  1. $.ajax({
  2. url : promoURL,
  3. timeout: 90000,
  4.  async: false,
  5. success : function(data) {
  6. returnValue = data;
  7. },
  8. error : function(jqXHR, exception) {
  9. var errorMessage = '';
  10. if (jqXHR.status === 0) {
  11. errorMessage = 'You are not connected, please verify your Network.';
  12. } else if (jqXHR.status == 404) {
  13. errorMessage = 'Requested page not found. [404]';
  14. } else if (jqXHR.status == 500) {
  15. errorMessage = 'Internal Server Error [500].';
  16. } else if (exception === 'parsererror') {
  17. errorMessage = 'Requested JSON parse failed.';
  18. } else if (exception === 'timeout') {
  19. errorMessage = 'Time out error has occured.';
  20. } else if (exception === 'abort') {
  21. errorMessage = 'Ajax request aborted.';
  22. }

  23. var errorObject = {
  24. "error" : [ {
  25. "code" : jqXHR.status,
  26. "description" : errorMessage
  27. } ]
  28. };
  29. returnValue = errorObject;
  30. }
  31. });
Thanks in advance.

Regards,
kumarjee Alluri