Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9308827
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 19, 20262026-06-19T00:43:16+00:00 2026-06-19T00:43:16+00:00

I have multiple ajax calls on the page. Lets call them A, B, C

  • 0

I have multiple ajax calls on the page. Lets call them A, B, C for the sake of brevity. “A” takes too long like 2 mins to get the data from server (I am ok with 2 mins). Whereas, “B” & “C” response-time is in milliseconds.

For some reason the AJAX calls are getting queued up after “A”. Even though the IE 9 can have 6 concurrent request connections simultanousuly for the same domain. You can see the concurrent connections in my screenshot below.

“A” takes 2 mins then “B” & “C” get into pending state until “A” is complete.

I found “ajax_threads.js” http://cmarshall.net/MySoftware/ajax/Threads/ but I don’t know if this would help. The way I understood “ajax_threads.js” is that it just provides multiple connections, that feature is there in modren browsers already. IE 7 used to have 2 connecitons.

first ajax call pending

Here is Javascript:

    $(function () {  $.ajax({
            type: "POST",
            url: "Service1.svc/GetDate",
            contentType: "application/json; charset=utf-8",
            dataType: "json",
            async: true,
            success: function (msg) {
                // Replace the div's content with the page method's return.
                $("#Result1").text(msg.d);
            }
        });


        $.ajax({
            type: "POST",
            url: "Service1.svc/GetDate2",
            contentType: "application/json; charset=utf-8",
            dataType: "json",
            async: true,
            success: function (msg) {
                // Replace the div's content with the page method's return.
                $("#Result2").text(msg.d);
            }
        });   }); 

HTML:

  <input type="button" id="Button1" value="1"/><div id="Result1"></div>
  <br/><input type="button" id="Button2" value="2"/><div id="Result2"></div>

Server Code: (Ajax enabled WCF)

     [ServiceContract(Namespace = "")]
     [AspNetCompatibilityRequirements(RequirementsMode =  
     AspNetCompatibilityRequirementsMode.Allowed)]
     public class Service1
{
    [OperationContract]
    public string GetDate()
    {
        System.Threading.Thread.Sleep(8000);
        return DateTime.Now.ToString();
    }

    [OperationContract]
    public string GetDate2()
    {
        System.Threading.Thread.Sleep(1000);
        return DateTime.Now.ToString();
    }     
}
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-19T00:43:17+00:00Added an answer on June 19, 2026 at 12:43 am

    I bet that you are using ASP.NET Session on your server. That’s standard symptoms when you use Sessions. The reason for that is extremely simple and stems from the design of the ASP.NET Session. It is not thread safe. So what ASP.NET does is simply lock the access to it. The consequence of this is that you cannot have parallel requests to be executed from the same Session. They will simply be queued exactly the way you are observing it.

    The best way to solve it is to simply get rid of this dreaded ASP.NET Session. Here’s what you could put in your web.config to ensure that no developer on your project ever does the mistake of using it:

    <system.web>
        <sessionState mode="Off" />
        ...
    </system.web>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have multiple ajax calls firing on page load. From request1 I expect response1
I have a simple question regarding multiple ajax calls, performing each call in sequence.
I have a page with multiple links that each perform different AJAX calls and
I have an ajax call that fires multiple times but is called once. function
I have a jQuery AJAX call that I will need to do multiple times
I have multiple ajax forms on page that cointain same elemets, I have jquery
I have a page with multiple DevExpress gridviews which are late-loaded via ajax. The
I have a page with multiple forms that I submit via Ajax POSTs serially.
I have Page A which calls Page B using AJAX. Page B will be
I have a page which loops through multiple unique id's and, using ajax, loads

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.