none
Services are getting down in godaddy server because of using async:false in ajax call RRS feed

  • Question

  • We are making ajax synchronous call to services,which are hosted in go-daddy server.
    And we discussed with them what is the reason behind this. They told because of these service hitting.Capacity for that domain 300 users simultaneously but we don't have that much traffic too. We used this application since 8 months we never faced this problem but these days services are getting down.

    And suggested make **async:false as async:true**, is it valid suggestion?
    And really async:false will have that much problem?

    Is there any mistake in my code/ what could be the reason?

    Thanks in advance.

        $.ajax({
           type: "POST",
           url: "https:www.xxx.com/Service.svc/GetQuestionBank",
           dataType: "xml",
      async:false,
           success: function (data) {
      window.wizSpinner.hide();
    window.plugins.loadingIndicator.hide();
    var serializer = new XMLSerializer();
    var xmlString = serializer.serializeToString(data);
    var finalxml= xmlString.replace(/&lt;/g, '<').replace(/&gt;/g, '>').replace('<br/>','\n');
    window.localStorage.setItem("xml_Question",finalxml);
                     }
              });
    Monday, September 2, 2013 9:52 AM

Answers

  • Hi,
    >>suggested make **async:false as async:true**, is it valid suggestion?

    I think so, make the async:true will be a valid suggestion for you.
    Using the async:false means you will use the synchronous. And using the synchronous requests may temporarily lock the browser, disabling any actions while the request is active.

    Best Regards,
    Amy Peng


    <THE CONTENT IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, WHETHER EXPRESS OR IMPLIED>
    Thanks
    MSDN Community Support

    Please remember to "Mark as Answer" the responses that resolved your issue. It is a common way to recognize those who have helped you, and makes it easier for other visitors to find the resolution later.

    Tuesday, September 3, 2013 9:09 AM
    Moderator