Multiple DWR sessions per client

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Multiple DWR sessions per client

Cullender, Daniel
CONTENTS DELETED
The author has deleted this message.
Reply | Threaded
Open this post in threaded view
|

Re: Multiple DWR sessions per client

Mike Wilson
Administrator
Hi Daniel,
This does sound odd. The only similar thing I've seen before is the "zombie socket bug" on IE6, where connections open when leaving a page (refreshing a page is also a way of leaving the old page instance) would be held on to / leaked.
I don't know how to interpret the listing you provided, but my general advice is to start looking at the browser end as Reverse Ajax polling is kept alive by the browser script. Have you performed a network sniff between browser and Apache? (f ex using Wireshark)
Best regards
Mike Wilson
 
Cullender, Daniel wrote:

Hi All,

 

I have been fiddling with this problem for a while with no luck. I have DWR 3 setup on Tomcat 7 which sits behind an apache2 reverse proxy. DWR is setup for reverse ajax (with polling).

 

The problem I am having is that every time a user refreshes a page which uses the dwr reverse ajax, a new connection is opened and the old ones do not expire.

I have tried setting

 

dwr.engine.setNotifyServerOnPageUnload(true)

 

but although I can see this invalidate the script session, the connect still seems to hang around. If I shut down my server, I can see each session checking for a heart beat, even though it is essentially an “orphan”

 

Any help / ideas would be greatly appreciated – I have a feeling that it is apache2 keeping them alive (although fiddling with the keepalive setting is not helping)

 

This is what my server-status looks like after pressing refresh a couple of times on my web page.

 

 

Srv          PID         Acc         M            CPU       SS           Req        Conn     Child      Slot        Client    VHost    Request

0-0          9228       0/8/8     _             0.11        587         60013    0.0          0.02        0.02                        co.za      POST /foo-dwr-stream/call/plainpoll/ReverseAjax.dwr HTTP/1.1

0-0          9228       0/6/6     _             0.11        584         60008    0.0          0.01        0.01                        co.za      POST /foo-dwr-stream/call/plainpoll/ReverseAjax.dwr HTTP/1.1

0-0          9228       0/5/5     _             0.11        583         60007    0.0          0.01        0.01                        co.za      POST /foo-dwr-stream/call/plainpoll/ReverseAjax.dwr HTTP/1.1

0-0          9228       0/5/5     _             0.11        581         60003    0.0          0.01        0.01                        co.za      POST /foo-dwr-stream/call/plainpoll/ReverseAjax.dwr HTTP/1.1

0-0          9228       0/5/5     _             0.11        580         60007    0.0          0.01        0.01                        co.za      POST /foo-dwr-stream/call/plainpoll/ReverseAjax.dwr HTTP/1.1

0-0          9228       0/6/6     _             0.12        578         60008    0.0          0.01        0.01                        co.za      POST /foo-dwr-stream/call/plainpoll/ReverseAjax.dwr HTTP/1.1

0-0          9228       0/5/5     _             0.12        577         60042    0.0          0.01        0.01                        co.za      POST /foo-dwr-stream/call/plainpoll/ReverseAjax.dwr HTTP/1.1

0-0          9228       0/5/5     _             0.15        575         60002    0.0          0.01        0.01                        co.za      POST /foo-dwr-stream/call/plainpoll/ReverseAjax.dwr HTTP/1.1

0-0          9228       0/1/1     _             0.15        450         60008    0.0          0.00        0.00                        co.za      POST /foo-dwr-stream/call/plainpoll/ReverseAjax.dwr HTTP/1.1

0-0          9228       0/4/4     _             0.16        328         60006    0.0          0.00        0.00                        co.za      POST /foo-dwr-stream/call/plainpoll/ReverseAjax.dwr HTTP/1.1

1-0          9229       0/5/5     _             0.09        581         60004    0.0          0.01        0.01                        co.za      POST /foo-dwr-stream/call/plainpoll/ReverseAjax.dwr HTTP/1.1

1-0          9229       0/3/3     _             0.08        595         60051    0.0          0.01        0.01                        co.za      POST /foo-dwr-stream/call/plainpoll/ReverseAjax.dwr HTTP/1.1

1-0          9229       0/6/6     _             0.08        585         60009    0.0          0.01        0.01                        co.za      POST /foo-dwr-stream/call/plainpoll/ReverseAjax.dwr HTTP/1.1

1-0          9229       0/5/5     _             0.08        582         60006    0.0          0.01        0.01                        co.za      POST /foo-dwr-stream/call/plainpoll/ReverseAjax.dwr HTTP/1.1

1-0          9229       0/5/5     _             0.09        578         60005    0.0          0.01        0.01                        co.za      POST /foo-dwr-stream/call/plainpoll/ReverseAjax.dwr HTTP/1.1

1-0          9229       0/7/7     _             0.09        579         60003    0.0          0.01        0.01                        co.za      POST /foo-dwr-stream/call/plainpoll/ReverseAjax.dwr HTTP/1.1

1-0          9229       0/5/5     _             0.09        576         60004    0.0          0.01        0.01                        co.za      POST /foo-dwr-stream/call/plainpoll/ReverseAjax.dwr HTTP/1.1

1-0          9229       0/1/1     _             0.09        514         60012    0.0          0.00        0.00                        co.za      POST /foo-dwr-stream/call/plainpoll/ReverseAjax.dwr HTTP/1.1

1-0          9229       0/1/1     _             0.10        390         60004    0.0          0.00        0.00                        co.za      POST /foo-dwr-stream/call/plainpoll/ReverseAjax.dwr HTTP/1.1

 

 

Regards

Daniel

 

 

 


This e-mail is subject to a disclaimer, available at

http://www.rmb.co.za/web/elements.nsf/online/disclaimer-communications.html