uamuzibora / nafasi

Uamuzi Bora on OpenMRS 1.9.
1 stars 0 forks source link

Fix Tomcat memory leak when deploying #18

Closed kenners closed 12 years ago

kenners commented 12 years ago

Probably needs something like this in /conf/web.xml file under in the JSP servlet definition:

<init-param>
    <param-name>enablePooling</param-name>
    <param-value>false</param-value>
</init-param>

More details at https://wiki.openmrs.org/display/docs/Troubleshooting+Memory+Errors

andrewlkho commented 12 years ago

This already appears to be set in our base AMI (see lines 262-265 of /opt/tomcat6/conf/web.xml).

andrewlkho commented 12 years ago

Actually, this is not the default in tomcat 6.0.29. @kenners can you please outline the steps you took (customisations) that resulted in the tomcat install in the AMI?

kenners commented 12 years ago

Yep, sure. Essentially, applied the following patch to the default conf/web.xml file:


diff --git a/web.xml b/web.xml
index e2b60ac..246cb9f 100644
--- a/web.xml
+++ b/web.xml
@@ -259,7 +259,11 @@
             <param-name>xpoweredBy</param-name>
             <param-value>false</param-value>
         </init-param>
-        <load-on-startup>3</load-on-startup>
+   <init-param>
+       <param-name>enablePooling</param-name>
+       <param-value>false</param-value>
+   </init-param>     
+   <load-on-startup>3</load-on-startup>
     </servlet>

I've also provided a Gist with the default and patched version of web.xml.

andrewlkho commented 12 years ago

Documented in the kasha wiki.