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 518493
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T07:56:34+00:00 2026-05-13T07:56:34+00:00

I am using the comet long-polling technique with apache, php, jquery. I’ve got a

  • 0

I am using the comet long-polling technique with apache, php, jquery.

I’ve got a basic comet update running and it works great. I’m now attempting to build a more complex comet script, and I want a better way to debug.

My comet scripts use $.ajax() with a long timeout, and the server side just sleeps until it either runs up to the timeout or has an event to send to the client. The comet requests go to a different subdomain than the main ajax requests.

For normal pages I edit and test on a linux laptop. I’ve got apache, mysql, and php with a test database and mirror image of the site. I can edit, save, and see the changes with no upload step. For the comet stuff I’ve been having to upload to a server to test. This requires me to set up a few fake servers, but mostly it requires me to upload changed files for each test. I’ve got a mostly automatic upload script, but it’s still too slow.

The problem testing locally is the long timeout. The browser won’t open another connection to the same server while the comet request is still open. I don’t have a subdomain locally so I have all the requests going to the same server so they basically block each other.

I’ve tried a number of things to make this work and none really do it. I tried first to change my browser setting for number of simultaneous connections. This didn’t work in firefox on linux, and I didn’t find anything about changing this limit on other browsers.

I tried setting my hosts file to give me two names that map to my ip address. Then I tried configuring VirtualHost conf directives in apache, but that didn’t work. I think because apache is looking for an actual dns server to tell it the hostname, not just my /etc/hosts file. Maybe I can run a local dns server to fool apache into thinking my box has two names, but that just seems like a real long way around this problem.

So, does anyone have an idea of how to make this work on one ip address/host?

I’m new to the comet thing, so maybe I’ve just got the wrong idea about something. Maybe this isn’t even possible. Either way, it’s time to just ask if this is already a solved problem.

  • 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-13T07:56:34+00:00Added an answer on May 13, 2026 at 7:56 am

    It really should be possible to use /etc/hosts to fool Apache. It certainly does work on Ubuntu Hardy with Apache 2.2.

    Try to give different hostname to you local address. Simply add a line like this to /etc/hosts:

    127.0.0.1    a.example.com b.example.com c.example.com d.example.com
    

    (Note: use a tab after IP)

    Validate this with a ping

    ping a.example.com
    

    In you apache configuration, you may use a wildcard alias together with a named virtual host:

    <VirtualHost *:80>
      ServerName example.com
      ServerAlias *.example.com
      ## snip ##
    <VirtualHost>
    

    Instead of using example.com, you might want to use something that’s under your control. I use local subdomain of our company’s domain (i.e. something.local.molindo.at).

    Now you can use different subdomains for your test, each with its own limitation on concurrent connections.

    You may need to restart your browser to get this working.

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

Sidebar

Ask A Question

Stats

  • Questions 291k
  • Answers 291k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer You could write your own decorator which looks at pylons.config["debug"],… May 13, 2026 at 5:58 pm
  • Editorial Team
    Editorial Team added an answer The reason why this is happening is because the return… May 13, 2026 at 5:58 pm
  • Editorial Team
    Editorial Team added an answer I figured it out with testing. In uriworkermap.properties, put: /*|/*=bal_worker1… May 13, 2026 at 5:58 pm

Related Questions

I need some help from some linux gurus. I am working on a webapp
see also WCF push to client through firewall I need to have a WCF
Ok, I am looking to implement COMET, and I stumbled on this page comparing
If you have total control of both ends of the wire (client and server),
I am trying to implement a Comet style (e.g. chat) application using IronPython. While

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

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.