Opened 10 years ago

Closed 8 years ago

#1437 closed defect (duplicate)

Memory leak in java webtier

Reported by: andymorf Owned by: trevorwekel
Priority: high Milestone: 2.2
Component: Web API Version: 2.2.0
Severity: critical Keywords: java webtier
Cc: External ID:


After every call to a servlet using Java- WebApi? the memory consumption of javaw.exe (tomcat) is increasing even after GC. A memory profiler on javaw shows that almost all the MgXXX objects remain in memory.

Discussion on internals mailing list leads to following solution:

Update line 2003 in /trunk/Oem/SWIGEx/Source/Modules/java.cxx with the following:

Replaceall(tm, "new $javaclassname(cPtr, $owner)", "($javaclassname)ObjectFactory?.createObject($module.getClassId(cPtr), cPtr, true)");

Attachments (1)

testmem.jsp (1.5 KB) - added by trevorwekel 10 years ago.
Memory leak test script

Download all attachments as: .zip

Change History (3)

Changed 10 years ago by trevorwekel

Attachment: testmem.jsp added

Memory leak test script

comment:1 Changed 10 years ago by trevorwekel

Owner: set to trevorwekel

Does the attached testmem.jsp script show the leak? It should run if dumped in www/mapviewerjava and accessed using http://server/mapguide/mapviewerjava/testmem.jsp.

If it does not show the leak, can you provide a different test script which does?

Also, which platform are you running (Windows, Linux, 32bit, 64bit...)?

comment:2 Changed 8 years ago by jng

Resolution: duplicate
Status: newclosed

Duplicate of #1960, which has been fixed

Note: See TracTickets for help on using tickets.