[ openjms-Bugs-947173 ] Memory leak
"SourceForge.net" <[email protected]> Mon, 03 May 2004 18:36:44 -0700
| Newsgroups | gmane.comp.java.openjms.devel |
|---|---|
| Message-ID | <[email protected]> |
Bugs item #947173, was opened at 2004-05-04 05:46 Message generated for change (Settings changed) made by tanderson You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=474136&aid=947173&group_id=54559 Category: server Group: v0.7.6 >Status: Closed Resolution: Invalid Priority: 5 Submitted By: Frank Augustin (augkf) Assigned to: Nobody/Anonymous (nobody) Summary: Memory leak Initial Comment: We try to use OpenJMS for communication within a database query system. Now we ran into a memory problem (OutOfMemory error on the server side). We contact the server via RMI. I have reproduced this memory problem with server and client on the same machine (WinXP) using the example console programs. I processed following steps: 1) Started server with startup.bat 2) Put a Thread.sleep(1000); to the beginning of the onMessage() method of file\src\examples\openjms\examples\client\console\Simple Consumer.java 3) Started runconsumer -topic mytopic 4) Started runpublisher -topic bla -count 100000 5) Observe servers process in the task manager If the memory consumption of the servers process exceeds 87MByte, I get following exception: javax.jms.JMSException: Failed to sendMessage java.rmi.UnmarshalException: Error unmarshaling return header; nested exception is:java.io.EOFException at org.exolab.jms.client.rmi.RmiJmsSessionStub.sendMessag e(RmiJmsSessionStub.java:177) at org.exolab.jms.client.JmsSession.sendMessage (JmsSession.java:867) at org.exolab.jms.client.JmsMessageProducer.sendMessage (JmsMessageProducer.java:285) at org.exolab.jms.client.JmsTopicPublisher.publish (JmsTopicPublisher.java:144) at openjms.examples.client.console.SimplePublisher.main (SimplePublisher.java:127) Additional in the Java console of the server I see sometimes a java.lang.OutOfMemoryError What can I do to prevent this errors? I played around with the GarbageCollectionConfiguration settings but it doesn't solved my problems... Thanks in advance Frank ---------------------------------------------------------------------- Comment By: Tim Anderson (tanderson) Date: 2004-05-04 11:36 Message: Logged In: YES user_id=557161 Not a bug per-se, but a limitation of how OpenJMS handles NON_PERSISTENT messages which don't expire. If you publish NON_PERSISTENT messages at a rate faster than they are consumed/expire then an OutOfMemoryException may arise. The recommended workaround is to: . ensure that a non-zero time-to-live is specified when messages are sent. . use PERSISTENT messages See http://openjms.sourceforge.net/config/gc.html for details on how OpenJMS manages memory. ---------------------------------------------------------------------- Comment By: Frank Augustin (augkf) Date: 2004-05-04 05:49 Message: Logged In: YES user_id=965333 Sorry, step 4) contains an error and should be: runpublisher -topic mytopic -count 100000 ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=474136&aid=947173&group_id=54559 ------------------------------------------------------- This SF.Net email is sponsored by: Oracle 10g Get certified on the hottest thing ever to hit the market... Oracle 10g. Take an Oracle 10g class now, and we'll give you the exam FREE. http://ads.osdn.com/?ad_id=3149&alloc_id=8166&op=click