PWM stop responding - Tomcat7 memory usage!

163 views
Skip to first unread message

I Haq

unread,
Jul 11, 2014, 5:31:57 AM7/11/14
to pwm-g...@googlegroups.com
Hi,
We are facing a big problem and I was wondering if someone could suggest me something.

We are using PWM with 64 bit eDir 888 on a 64 bit Windows 2008 R2 server plus Tomcat7 and Apache 2.2.
We are running both PWM 1.7.1 and PWM 1.6.4.

The problem is that Tomcat is using huge amount of memory and there isn't crazy load on the server either. It is using approx 600mb all the times and in times it exceeds 1g and that is the time when PWM stop responding. During this time, Tomcat is still running and "processing" and hence we don't have any error messages in the Tomcat log.
Restarting Tomcat doesn't help resolve the problem and we have to restart the server. Once the server is restarted, it works for a while and then the same happens again.

Can anyone please suggest me anything? I will be extremely thankful. 

Thanks 

Regards
Izaz
University of Stavanger, Norway.

Menno Pieters

unread,
Jul 11, 2014, 7:50:18 AM7/11/14
to pwm-g...@googlegroups.com
Usually PWM does not require that much memory, but your setup is probably used a bit more than most setups I've come across. I think you will have to tune the Java memory settings for Tomcat and give it a bit more memory than your current settings.


--
You received this message because you are subscribed to the Google Groups "pwm-general" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pwm-general...@googlegroups.com.
To post to this group, send email to pwm-g...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/pwm-general/a47e55ad-73cb-40e2-bc9d-92b872458f5e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

I Haq

unread,
Jul 11, 2014, 8:13:25 AM7/11/14
to pwm-g...@googlegroups.com
Thank you for the answer. 

I am sorry I forgot to mention that I have already set the initial memory pool for Tomcat to 1G and Maximum memory pool to 4G but it seems like there might be some memory leak or something like that.

Jason Rivard

unread,
Jul 13, 2014, 3:54:45 AM7/13/14
to pwm-g...@googlegroups.com
This is reasonable behavior for the settings your using.  If you set the max heap size to 4g on server class machine, the JVM will use it all.  You should probably google "Java memory tuning".  

A better place to start would be setting min/max to same value such as:

-Xmx512m -Xms512m.  

Then check logs for "out of memory" errors.  

Silvio Arcangeli

unread,
Jul 18, 2014, 3:56:10 AM7/18/14
to pwm-g...@googlegroups.com


Il giorno domenica 13 luglio 2014 09:54:45 UTC+2, Jason Rivard ha scritto:
This is reasonable behavior for the settings your using.  If you set the max heap size to 4g on server class machine, the JVM will use it all.  You should probably google "Java memory tuning".  

A better place to start would be setting min/max to same value such as:

-Xmx512m -Xms512m.  

Then check logs for "out of memory" errors.  


I agree.
I know it doesn't sound obvious, but if you had that trouble the first thing to try is rather *reducing* the -Xmx and -Xms amounts.
Did you seen any ouf of memory erros in the catalina.log or catalina.out files? if you didn't, there was no compelling reason to increase the amount of memory assigned to the JVM.
If you assign more memory to the JVM, it will very likely use it, because (if your system has memory available) that helps reducing the frequency of the garbage collector cycles and improve overall performance.
But in order to tune the -Xm parameters what you should check first is not how much memory is consumed by the Java process in the OS, but rather how much of that memory is actually being consumed inside the JVM itself by the Java applications (Tomcat and its web apps in your case).
Refer to the JVM manuals on how to log and tune that.

Regards,
Silvio
Reply all
Reply to author
Forward
0 new messages