Bugs item #1090921, was opened at 2004-12-24 11:18 Message generated for change (Comment added) made by starksm You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=376685&aid=1090921&group_id=22866
Category: JBossCMP Group: v4.0 >Status: Closed >Resolution: Duplicate Priority: 5 Submitted By: Mormota (atomrom) Assigned to: Alexey Loubyansky (loubyansky) Summary: memory leak after 7 hours Initial Comment: Hi, I have experienced strange memory leaks under JBoss 4.0.0 after 7 hours, and under JBoss 4.0.1RC2 after 3.5 hours running my application. (In the first 7 hours my application consumes 100M of memory under 4.0.0, however after 7 hours the memory consumption raises lineraly). I used YourKit to detect the memory leak and I found that the memory is chiefly occupied by HashMap and entity bean proxies. Unfortunately I cannot provide source code, but I can give a short description of the component architecture and functioning: (a) objects are inserted into a messaging topic (b) an MDB receives the objects and: (b.i) dispaches them to a resource adapter (the RA sends the object over the network) (b.ii) creates a database entry using the String(s) returned by the RA (a tuple looks like this: [String: id, Date: date, String: st]; I'm using a CMP entity bean) (c) a timer periodically removes the overaged database entries (see date). ejbTimeout is implemented by a stateless session bean, database entries are removed by the corresponding CMP entity bean (d) whenever the RA receives an object over the network, it dispatches it to a stateless session bean, which is registered as an endpoint at the RA (e) the stateless session bean (e.i) updates the database entry (using the ), or more precisely, its "st" field (e.ii) inserts a new database entry (e.iii) if the "st" field statisfies certain conditions, removes both the inserted and updated entries Additional infos: * OS: RedHat AS (running on various hardware, e.g. simple PC and a 4 processor Xeon server) * JDK: jdk1.4.5 * I see lot of log messages regarding rolled back transactions (because of timeouts); these exceptions are thrown in the CMP entity bean in that method, which removes the overaged entries. After a findByDate I iterate over the resulting collection and when I want to access "id", an exception is thrown. Not always, but strangely often. * the memory leak emerges after 7 (or 3.5) hours regardless the load, and configuration. The load influences only the gradient of the lineraly increasing (and therefore deadly) period. Merry Christmas, Mormota ---------------------------------------------------------------------- >Comment By: Scott M Stark (starksm) Date: 2004-12-29 12:47 Message: Logged In: YES user_id=175228 Please continue on the jira site: http://jira.jboss.com/jira/browse/JBAS-1255 ---------------------------------------------------------------------- Comment By: Mormota (atomrom) Date: 2004-12-29 10:45 Message: Logged In: YES user_id=1184354 Some new details: I simplified the application to the following (see new step b.iii): (a) objects are inserted into a messaging topic (b) an MDB receives the objects and: (b.i) dispaches them to a resource adapter (the RA sends the object over the network) (b.ii) creates a database entry using the String(s) returned by the RA (a tuple looks like this: [String: id, Date: date, String: st]; I'm using a CMP entity bean) (b.iii) _removes the new entry_ Despite the database entries are removed instantly after their creation (and therefore the database is empty), the memory usade increases steadyly. In stable JBoss 4.0.1, there is no 3.5 (or 7) hours long constant-memory-use period. The pace of memory consumption growth can be reduced by using C "commit option" (instead of the default B). Memory leak still persist when using jdk 1.5. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=376685&aid=1090921&group_id=22866 ------------------------------------------------------- SF email is sponsored by - The IT Product Guide Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now. http://productguide.itmanagersjournal.com/ _______________________________________________ JBoss-Development mailing list JBoss-Development@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jboss-development