Forum: Rails Spinoffs (closed, excessive spam) Ajax.Request causing Socket Exception on Weblogic 9.2

2e3a93b985bb4844e2bbddce45695f08?d=identicon&s=25 krichnaf (Guest)
on 2008-06-16 19:49
(Received via mailing list)
I have an Ajax.Request call

new Ajax.Request(getURL()+'/context/className.finder', {
          method:'post',
          parameters: 'session=htc&tra='+tra+'&curPg='+$
('curPg').getValue()+
                            '&tabType='+$('tabType').getValue()+
                            '&fiditcd='+$('fiditcd').getValue()
+'&itcdqs='+itcdqs,
          requestHeaders: {Accept: 'application/json'},
          evalJSON: 'force',
          onSuccess: function(transport){
            var json = transport.responseJSON;
                if (json != null) {
                        if (json.error == undefined) {
                                $('main').hide();
                                $('listTable').hide();
                                $('add').show();

                                var table =
FinderTable.buildTable(json);
                                $('finderResults').update();
                                $('finderResults').insert(table);
                        } else {
                                buildErrorScreen(json);
                        }
                }
                $('loaderGif').hide();
                $('copygen').hide();
          }
        });

When hitting this Ajax call over an over again, using IE in a fast
unusual manner, Weblogic 9.2 will through the following Exception:

 <Error> <Socket> <BEA-000403> <IOException occurred on socket:
 java.net.SocketException: Connection refused.
java.net.SocketException: Connection refused
        at java.net.SocketInputStream.socketRead0(Native Method)
        at java.net.SocketInputStream.read(SocketInputStream.java:129)
        at
weblogic.socket.SocketMuxer.readReadySocketOnce(SocketMuxer.java:826)
        at
weblogic.socket.SocketMuxer.readReadySocket(SocketMuxer.java:802)
        at
weblogic.socket.DevPollSocketMuxer.processSockets(DevPollSocketMuxer.java:
120)
        Truncated. see log file for complete stacktrace


I was wondering if anyone else has experienced this?  The application
sees no ill affect but our log files are getting filled up.

This is my first time working with Prototype and I like how the Ajax
calls are easier to do.  In my previous work with XMLHTTPRequest I
never had this issue.

Is there a way to handle a socket connections to open to only one port
and stay connected?  Or should a new port be opened on every
connection?  Any help would be appreciated thanks.
Ca3e484c121268e4c8302616b2395eb9?d=identicon&s=25 T.J. Crowder (Guest)
on 2008-06-17 09:51
(Received via mailing list)
Hi,

>  <Error> <Socket> <BEA-000403> <IOException occurred on socket:
>  java.net.SocketException: Connection refused.

My suspicion is that this a weblogic thing rather than a Prototype
thing.  There's something about what you're doing that weblogic
doesn't like and so it periodically refuses the connection.  This
could be it rate-limiting individual clients, or being overloaded,
or...

> Is there a way to handle a socket connections to open to only one port
> and stay connected?  Or should a new port be opened on every
> connection?

That'll be up to the browser and server negotiating whether to allow
HTTP "keep alives":
http://en.wikipedia.org/wiki/HTTP_persistent_connections

Hope this helps,
--
T.J. Crowder
tj / crowder software / com
This topic is locked and can not be replied to.