• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Too many CLOSE_WAIT s due to AJAX call

 
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have simulated push behavior using AJAX calls from IE. Parts of web page get updated every second getting fresh content from the server using the request object displayed below. However, after a while (some time 5 minutes, sometimes 15 minutes or so later) the update stops happening. The IE icon spins relentlessly, but no content update.

One observation made is that with "netstat -an" on the client system, we can see may be hundred or more connections to server with TCP state "CLOSE_WAIT"

Any suggestions how to get the screen updated without interruption?

 
author
Posts: 15385
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Look into COMET.

Eric
 
Sheriff
Posts: 67746
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Do you not think that banging on the server every second is a bit excessive? How many pages are doing this sumultaneously?
 
Prakas Subed
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
To the user it's not excessive. They want to see near real time (minimum of 1 second) update of data on their browser. That's roughly 30KB data that need to be generated and shipped to the browser every second.

However, it's only one page whose final size is less than 32KB when shipped to the browser. Currently this 32Kb HTML replaces an innerHTML on a template html with logos etc already loaded. Users limited to a maximum of 5.

So much for AJAX's simulated push hype?!

With COMET's approach, seems that we will have to redo much of the way things are already done.


Originally posted by Bear Bibeault:
Do you not think that banging on the server every second is a bit excessive? How many pages are doing this sumultaneously?

 
Eric Pascarello
author
Posts: 15385
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Your server is going to come to a crashing halt when it has multiple users. You probably should look at FLEX which is better for real time data.

Eric
 
Prakas Subed
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Server is handling fine. In less than 200ms its generating the content and sending out (per avg response time measurement of related servlet/jsp WAS). Browser (IE 6) seems to get confused with multiple AJAX calls made to the server.

The same code works fine on Firefox to update the content within the second without interruption; except there's a noticeable flicker on Firefox when the html rendered with the update.


Originally posted by Eric Pascarello:
Your server is going to come to a crashing halt when it has multiple users. You probably should look at FLEX which is better for real time data.

Eric

reply
    Bookmark Topic Watch Topic
  • New Topic