Re: dirty socket growth problem
Peter Jones - JavaSoft East <[email protected]> Wed, 7 Dec 2005 14:38:09 -0500
| Newsgroups | gmane.comp.java.sun.rmi |
|---|---|
| Message-ID | <20051207193809.GB17949@east> |
> I am using jdk1.4 to run an RMI program and I have a socket growth
> problem on linux and solaris (I have not tried windows). The
> problem is that every 5 minutes we see an increase in sockets using
> the following command (as root):
>
> /usr/sbin/lsof -p 9706
>
> java 9706 root 594u sock 0,0 618721 can't identify protocol
> java 9706 root 595u sock 0,0 623390 can't identify protocol
> java 9706 root 596u sock 0,0 618749 can't identify protocol
> java 9706 root 598u sock 0,0 623394 can't identify protocol
> etc...
I'm not quite sure how to interpret that. Does netstat show an
increasing number of ESTABLISHED connections (from 192.168.1.47)? Do
you notice this effect in both the client (remote caller) and server
(remote object) processes? (Or are they in the same process?)
> On solaris I think this just keeps growing and growing (but does not
> die). On linux it gets to a certain size and then has a problem.
What problem, specifically? Do you have a complete exception trace?
> We are using our own socket factories and so I added debug to figure
> out why we were creating so many sockets. Anyway it turns out it
> was not our socket factory.
You mean that the growth does not correspond to invocations of your
factory's createSocket method?
> I turned on the RMI debug and discovered the sockets increase every
> time the lease is renewed:
>
> ...
> FINER: RMI TCP Connection(2)-192.168.1.47: call dispatcher
> Dec 5, 2005 3:42:29 PM sun.rmi.server.UnicastServerRef logCall
> FINER: RMI TCP Connection(2)-192.168.1.47: [192.168.1.47: sun.rmi.transport.DGCImpl[0:0:0, 2]: java.rmi.dgc.Lease dirty(java.rmi.server.ObjID[], long, java.rmi.dgc.Lease)]
> ...
What logging output do you see on the client side, with the
sun.rmi.transport.tcp logger enabled?
http://java.sun.com/j2se/1.4.2/docs/guide/rmi/logging.html
For example, logging messages like "create connection", "connection
timeout expired", etc.?
> We tried testing the code with jdk1.3.1_02 and this problem does not
> occur. Also on jdk1.4.1_07 I can prevent the sockets growing by
> just increasing the lease time to some very large number.
Do you have a small test case that exhibits this effect, with command
lines, etc.?
-- Peter
===========================================================================
To unsubscribe, send email to [email protected] and include in the body
of the message "signoff RMI-USERS". For general help, send email to
[email protected] and include in the body of the message "help".
For a list of frequently asked RMI questions please refer to:
http://java.sun.com/j2se/1.3/docs/guide/rmi/faq.html
To view past RMI-USERS postings, please see:
http://archives.java.sun.com/archives/rmi-users.html