-2

I am using long polling to check if there is any new incoming data.I am facing a problem when one request is waiting for a response the other requests are not being processed until this one completes.I am using jQuery Ajax post method and async = true.Can anyone help me with this.I think my requests are getting queued until the previous one timesout.

Tyranicangel
  • 189
  • 2
  • 16

1 Answers1

0

It isn't a problem with the ajax or javascript. It is your php locking the session. You need to add session_write_close(); to the php that is running on your long poll.

Pitchinnate
  • 7,517
  • 1
  • 20
  • 37