Why is a DataTables AJAX redraw blocking for nearly 2 minutes?

Why is a DataTables AJAX redraw blocking for nearly 2 minutes?

AlexKAlexK Posts: 1Questions: 0Answers: 0
edited August 2011 in General
So, I'm making a jQuery AJAX GET request (via refreshing a jQuery DataTables table) using getJSON within fnServerData that is consistently blocking for 1.7 - 2 minutes. I've added console.time(End) all around the code that makes the request and cannot find the delay in my code. It is definitely in getJSON. The Firebug net panel shows that "Blocking" takes up the vast majority of the entire AJAX request/response time. See: http://i.stack.imgur.com/bQc0W.jpg.

I have HTTPScoop open as well and it doesn't register the HTTP request until the last 2 seconds, which corresponds to the actual "Wait" time in Firebug. I've replicated this issue in Chrome using Developer Tools as well.

But here is the kicker: this issue only exists on the network at work, not at home. Two coworkers have confirmed that this issue doesn't exist using their home networks, just at work.

So, all of this evidence leads me to believe that this is a network issue, thought that doesn't make much sense. Does anyone have any ideas? Even possibilities to research would be great. Thank you.

For reference, I'm using jQuery 1.4.2, jQuery DataTables 1.7.6, with Rails 2.3.5 on the server side.

Replies

  • StephanStephan Posts: 20Questions: 0Answers: 0
    This really sounds like a network related issue. How do other AJAX calls within your webapp behave? Did you already test with a sample call not related to datatables?
  • allanallan Posts: 63,523Questions: 1Answers: 10,473 Site admin
    Sounds like something in the networking stack to me as well. Are you loading a whole load of other stuff at the same time (image, CSS whatever)? Browsers limit the number of connections to the server so they don't DDoS the sever when just requesting a web-page - so I'm wondering if it is that. But 2 minutes is a very long time!

    What does the Chrome networking panel show?

    Allan
This discussion has been closed.