I've a problem with running a jython 2.7b1 modjy-app within Tomcat.  When undeploying or stopping my jython app, it seems that the app is not shut down correctly.
After deploying and undeploying multiple times, the server crashes with "java.lang.OutOfMemoryError: PermGen space". With every deploying cycle the perm gen space increases. The number of threads is also just going up and does not decrease after an undeploy action.

Searching the internet I've found multiple posts describing the same problem. Is this a general problem? Or am I doing something wrong? Is there a workaround?

Thanks for your replies in advance. :-)