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

  • Home
  • SEARCH
  • 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 6628197
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T22:06:09+00:00 2026-05-25T22:06:09+00:00

I’m running into a problem while running both a Flash socket and using Ajax

  • 0

I’m running into a problem while running both a Flash socket and using Ajax to load pages. Both work fine separately. I am able to browse my site using the Ajax calls, or I am able to send/receive messages through the socket.

However, when the socket is connected for some reason the Ajax calls start to seemingly be put into a queue and never actually finish until I stop the socket. If I disconnect from the socket, or close the socket on the server side, then the Ajax call immediately finishes and loads the page. The Ajax call never times out, it just waits forever, right up until I close the socket connection.

In JavaScript, I’m using jQuery’s $.getJSON() function to load the pages (which I thought were asynchronous calls).

In Flash I’m using the basic ActionScript 3 Socket class:

this._socket = new Socket();
this._socket.addEventListener(Event.CONNECT, onConnectHandler);
this._socket.addEventListener(Event.CLOSE, onCloseHandler);
this._socket.addEventListener(IOErrorEvent.IO_ERROR, onIOErrorHandler);
this._socket.addEventListener(ProgressEvent.SOCKET_DATA, onDataHandler);
this._socket.addEventListener(SecurityErrorEvent.SECURITY_ERROR, onSecurityErrorHandler);

EDIT:

I’ve verified that no HTTP request is being made. It is in fact being queued by the browser for some reason. I also noticed that not only will it queue the Ajax requests, but it also will queue a browser refresh. If I hit the refresh button it hangs forever as well.

EDIT 2:

Actually, I was checking port 80 when I should have been checking port 443. There is actually a request being made to the server, it’s just hanging for some reason. This leads me to believe that there’s an issue with the socket (which is using PHP) somehow making the PHP processor queue the requests, or maybe Apache is queuing the requests since it sees PHP is being used by the socket. I’m still not sure why the additional requests to the PHP processor are not being fulfilled until the socket is closed, but I’m pretty sure it has something to do with the fact that the PHP socket is in an always-open state and blocking the other requests.

  • 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-05-25T22:06:10+00:00Added an answer on May 25, 2026 at 10:06 pm

    Apparently the issue is due to the 2-limit connection that browsers implement. Since the socket uses one of the persistent connections to the host, the rest of the HTTP requests get bottle-necked.

    The problem and solution are described here:

    …if the browser was going to limit the number of
    connections to a single host that the answer was simply to trick the
    browser into thinking it was talking to more than one host. Turns out
    doing this is rather trivial: simply add multiple CNAMEs for the same
    host to DNS, and then reference those as the host for some of the
    objects in the page.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am currently running into a problem where an element is coming back from
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I have a French site that I want to parse, but am running into
I ran into a problem. Wrote the following code snippet: teksti = teksti.Trim() teksti
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I'm new to using the Perl treebuilder module for HTML parsing and can't figure
this is what i have right now Drawing an RSS feed into the php,
I'm using v2.0 of ClassTextile.php, with the following call: $testimonial_text = $textile->TextileRestricted($_POST['testimonial']); ... and
I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
We're building an app, our first using Rails 3, and we're having to build

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.