dirty socket growth problem
Stuart <[email protected]> Wed, 7 Dec 2005 20:00:57 +0800
| Newsgroups | gmane.comp.java.sun.rmi |
|---|---|
| Message-ID | <[email protected]> |
All 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... 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. 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. 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)] ... 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. Please help me find a solution that does not require setting a very large lease time. Thanks, Stuart =========================================================================== 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