Hello Hakon,
As you may already know, PermGen space (a separate area of heap memory)
contains long-lived classes, anonymous classes and interned strings. Memory
errors related to PermGen indicate that the GC (Garbage collection) is
running frequently to cleanup those classes and thereby consuming the
limited available PermGen space.
Couple of recommendations:
1. Take a deep look into your code (as deep as possible) and cleanup
your objects explicitly. Perhaps, running a memory profiler would validate
the frequent invocations of GC. You may have to find a suitable profiler.
2. Increase the PermGen space available to JVM along with the Heap space
using the command switches:
-Xms256m -Xmx512m -XX:MaxPermSize=512m
As seen, the first two swiches take care of Heap space and the last one for
PermGen space. I normally set the system env variable CATALINA_OPTS to set
the above JVM switches.
Hope this helps.
Thanks,
Seshi Patibanda
On Thu, Feb 26, 2009 at 8:37 AM, Håkon Sagehaug
<[email protected]>wrote:
> Hi all,
>
> I'm experimenting with web services deployed with axis2 in tomcat using ssl
> for securing them and noticed something strange. I can call one of the
> services many times and no problems, but when I want to call another
> service I get
>
> java.lang.OutOfMemoryError: PermGen space
>
> from tomcat. If I start tomcat without ssl enabled all services and
> container behaves normally, calling them multiple times works as it should.
> Have anyone experienced anything similar? I've not altered any of the web
> services just added the tomcat ssl connector and configured it like this
>
> <Connector port="8443" protocol="HTTP/1.1" SSLEnabled="true"
> maxThreads="200" scheme="https" secure="true"
> clientAuth="false" sslProtocol="TLS" enableLookups="true"
> keystoreFile="${user.home}/my.jks"
> keystorePass="password" acceptCount="100"
> minSpareThreads="5" maxSpareThreads="75"
> disableUploadTimeout="true"
> />
>
> I'm usign axis2-1.4.1, tomat 6.0.18
>
> cheers, Håkon
>
>
> --
> Håkon Sagehaug, Scientific Programmer
> Parallab, Bergen Center for Computational Science (BCCS)
> UNIFOB AS (University of Bergen Research Company)
>