Fully featured low overhead profiler for Java EE and Java SE platforms.
Performance monitoring and profiling of Jenkins, TeamCity, Gradle, Maven, Ant, JUnit and TestNG.
Easy to use performance and memory profiler for .NET framework.

OutOfMemoryError when there seems to be plenty of memory

Moderators: Vladimir Kondratyev, Anton Katilin

OutOfMemoryError when there seems to be plenty of memory

Postby Head » Thu Apr 21, 2005 3:21 am

Sorry if this is the wrong forum for this but there's no other forum that seems right for this sort of question.

I purchased yourkit because we are having more and more frequent OutOfMemoryErrors when we run Tomcat. We start it with -Xmx768m and -Xms128m which seems like it should be enough.

I have attached to a running instance of Tomcat that is getting the OutOfMemory messages but it is only using about 100MB. And, yes, I did the object allocation to see how much garbage we are getting and it's around 10-30MB (nowhere near the 668MB that would be need to fill up the 768MB max).

So what's going on? What else could be causing the OutOfMemoryError? I've started thinking maybe it's related to -Xss but I don't have much knowledge of its effect. We do have quite a few Contexts which probably generates a lot of threads... maybe that's where the problem lies. But I don't know that yourkit can help with this sort of problem, can it?

Any thoughts or suggestions are welcome.
Posts: 4
Joined: Mon Mar 28, 2005 9:25 pm

Postby Head » Thu Apr 21, 2005 5:21 am

After some google research, I'm quickly coming to the conclusion that threading is my memory issue. On Linux, each thread defaults to taking 8MB and my Tomcat starts out with 77 threads and grows from there... that means I'm starting at a base of 600MB just for the thread stacks!

It's a constant learning process... that's why it's so fun!
Posts: 4
Joined: Mon Mar 28, 2005 9:25 pm

Return to Java Profiler

Who is online

Users browsing this forum: Google [Bot] and 1 guest


YourKit uses cookies and other tracking technologies to improve your browsing experience on our website, to show you personalized content and targeted ads, to analyze our website traffic, and to understand where our visitors are coming from.

By browsing our website, you consent to our use of cookies and other tracking technologies in accordance with the Privacy Policy.