Opened 14 years ago

Closed 12 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:

Description

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 14 years ago.
Memory leak test script

Download all attachments as: .zip

Change History (3)

by trevorwekel, 14 years ago

Attachment: testmem.jsp added

Memory leak test script

comment:1 by trevorwekel, 14 years ago

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 by jng, 12 years ago

Resolution: duplicate
Status: newclosed

Duplicate of #1960, which has been fixed

Note: See TracTickets for help on using tickets.