Re: memory leak in tomcat

2012-06-05 Thread Christian Kaufhold
Hi Warren,

thanks for the help. I found that the application
creates lots of SessionFactoryImpl objects
even though one is enough

I changed this part of webapp. Now it has only one
SessionFactoryImpl and the memory leak is gone.

bye

2012/5/24 Warren Bell 

> Is this the same server with the Wicket app you posted about earlier ?
> If so, you have a Wicket app that is storing the
> SessionFactoryObjectFactory on a page as a class member. Wicket stores
> each page a user has been to in the user's session. If the page has
> class members, then it serializes them and stores them too. I have seen
> this kind of thing happen many times before causing big memory usage.
>
> Remove the Wicket app and run the Eclipse Memory Analyzer.
>
> Thanks,
>
> Warren Bell
>
> On 5/24/12 5:42 AM, Konstantin Kolinko wrote:
> > 2012/5/24 Christian Kaufhold :
> >> Hi,
> >>
> >> I have a leaking Tomcat App
> >> I checked the heap with the Eclipse Memory Analyser
> >> and it says
> >>
> >> The classloader/component
> *"org.apache.catalina.loader.WebappClassLoader @
> >> 0x94532f50"*
> >> occupies *376.421.152 (79,51%)* bytes. The memory is accumulated in one
> >> instance of
> >> *"java.util.HashMap$Entry[]"* loaded by *""*.
> >>
> >
> > So the memory is used for something useful? That is not a "memory
> > leak". It is just a web application requiring a lot of memory.
> >
> > WebappClassLoader is the classloader that is used to load the classes
> > of your webapp.  Of course, it remembers every class that it loaded
> > (to satisfy repeated class.forName() calls) and every class that it
> > loads has a reference it it (via getClass().getClassLoader()).
> >
> > There may be many classes, but I do not think that the classloader
> > itself is responsible for 300 Mb of memory.
> >
> >> and the data that is in the entries of the gigantic Map is
> >> org.hibernate.impl.SessionFactoryObjectFactory
> >>
> >
> > That would be a hibernate question. I have no clue what that class is
> about.
> >
> > Best regards,
> > Konstantin Kolinko
> >
> > -
> > To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> > For additional commands, e-mail: users-h...@tomcat.apache.org
> >
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
>
>


memory leak in tomcat

2012-05-24 Thread Christian Kaufhold
Hi,

I have a leaking Tomcat App
I checked the heap with the Eclipse Memory Analyser
and it says

The classloader/component *"org.apache.catalina.loader.WebappClassLoader @
0x94532f50"*
occupies *376.421.152 (79,51%)* bytes. The memory is accumulated in one
instance of
*"java.util.HashMap$Entry[]"* loaded by *""*.

and the data that is in the entries of the gigantic Map is
org.hibernate.impl.SessionFactoryObjectFactory

Does anyone know why this?

Christian




**
  Class Name Shallow Heap Retained Heap

   - java.util.HashMap$Entry[64] @ 0xaa9314c0 

272 339.906.832 [image: \]

   - *table* java.util.HashMap @ 0xaa931498 

40 339.906.872 [image: .][image: \]

   - *map* org.hibernate.util.FastHashMap @ 0x94e4bc98

16 339.906.888 [image: .][image: .][image: \]

   - *INSTANCES* class org.hibernate.impl.SessionFactoryObjectFactory @
   0x759319f8 

24 339.907.088 [image: .][image: .][image: .][image: \]

   - *[1788]* java.lang.Object[5120] @ 0x95148470 

20.496 375.206.992 [image: .][image: .][image: .][image: .][image: \]

   - *elementData* java.util.Vector @ 0x94538998 

24 375.207.016 [image: .][image: .][image: .][image: .][image: .][image: \]

   - *classes* org.apache.catalina.loader.WebappClassLoader @
0x94532f50

176 376.421.152 [image: .][image: .][image: .][image: .][image:
.][image: .][image:
+]

   - *contextClassLoader* java.lang.Thread @ 0x94e1ac60
Thread-10
   *Thread*

112 7.112 [image: .][image: .][image: .][image: .][image: .][image: .][image:
+]

   - *contextClassLoader* de.bfd.tools.ConnectionPool$ConnPoolMultiCaster @
   0x94e1ad00 Thread-9  »

136 592 [image: .][image: .][image: .][image: .][image: .][image: .][image:
+]

   - *contextClassLoader* java.lang.Thread @ 0x9bb7b548
Keep-Alive-Timer»

112 168 [image: .][image: .][image: .][image: .][image: .][image: .][image:
+]

   - *classloader* java.security.ProtectionDomain @
0x9453a160»


Re: tomcat slowing down

2012-05-23 Thread Christian Kaufhold
Hi George,

No its just a plain server.
I used selenium and probe to check the issue.
Its definitely a Memory leak problem.

I try to find the leaks now.


Von meinem iPad gesendet

Am 23.05.2012 um 18:42 schrieb George Sexton :

> Just out of idle curiosity, are you running in a virtual server?
> 
> On 5/16/12 6:49 AM, Christian Kaufhold wrote:
>> Hi,
>> 
>> we have the problem that tomact is slowing down after a while
>> until even the manager app becomes unusable.
>> 
>> Our System:
>> 2 Quadcores/24 GB Mem
>> OpenSuse 11.4
>> tomcat 6.0.29
>> wicket/hibernate/postgres
>> 
>> Max Memory and total Memory 2GB
>> Free Momory 500 MB when the system is slow
>> top shows 100 CPU usage by tomcat
>> 
>> Symptom
>>  System is initially ok, but is slowing down dramtically over time
>> when about 30 User are active
>> 
>> What can we do to analyse the problem?
>> 
>> thanks
>> 
> 
> -- 
> George Sexton
> MH Software, Inc.
> 303 438-9585
> http://www.mhsoftware.com/
> 
> 
> -
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
> 

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: tomcat slowing down

2012-05-17 Thread Christian Kaufhold
Hi Warren,

thanx, but I think session size is not an issue with 30 users since Tomcat has 
about
2 GB memory.

But who knows, do you know a way to check the size of a session in tomcat?

christian

Am 17.05.2012 um 00:44 schrieb Warren Bell:

> Here is a good link explaining some of the pros and cons of Wicket. Look
> at the part titled "Wicket Session size!"
> 
> http://www.small-improvements.com/10-things-about-apache-wicket-i-love
> 
> Thanks,
> 
> Warren Bell
> 
> On 5/16/12 12:49 PM, Mikolaj Rydzewski wrote:
>> On 05/16/2012 05:35 PM, Christian Kaufhold wrote:
>>> its not intentional but the myfaces App runs on the server for years now
>>> and should not cause the problem
>>> I recently deployed a wicket app and now
>>> the server is slowing down when we have about 10 users or so.
>>> 
>> 
>> So there are two different applications? Myfaces (which used to work for
>> a long time) and wicket (which takes server down)?
>> I'd separate them first to have clear environment for investigation.
>> Then enable GC logging, attach jvisualvm, deploy psi probe
>> (http://code.google.com/p/psi-probe/), etc.
>> 
> 
> -
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
> 


-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: tomcat slowing down

2012-05-16 Thread Christian Kaufhold
Hi Mikolaj,

thanks I will do that,
do you know a free tool to generate request for the simulation
of about 30 clients being connected?


Am 16.05.2012 um 21:49 schrieb Mikolaj Rydzewski:

> On 05/16/2012 05:35 PM, Christian Kaufhold wrote:
>> its not intentional but the myfaces App runs on the server for years now
>> and should not cause the problem
>> I recently deployed a wicket app and now
>> the server is slowing down when we have about 10 users or so.
>> 
> 
> So there are two different applications? Myfaces (which used to work for a 
> long time) and wicket (which takes server down)?
> I'd separate them first to have clear environment for investigation. Then 
> enable GC logging, attach jvisualvm, deploy psi probe 
> (http://code.google.com/p/psi-probe/), etc.
> 
> -- 
> Mikolaj Rydzewski
> 
> 
> -
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
> 


-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: tomcat slowing down

2012-05-16 Thread Christian Kaufhold
Hi Christopher,

its not intentional but the myfaces App runs on the server for years now
and should not cause the problem
I recently deployed a wicket app and now
the server is slowing down when we have about 10 users or so.

I have no idea of whats going on...




2012/5/16 Christopher Schultz 

> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA1
>
> Christian,
>
> On 5/16/12 11:00 AM, Mikolaj Rydzewski wrote:
> > On 16.05.2012 16:46, Christian Kaufhold wrote:
> >
> >> I made a thread dump off the slow server.
> >
> > You need to investigate it with application developers.
>
> +1
>
> I did notice some of the threads performing debugging operations (in
> myfaces). Is that intentional?
>
> - -chris
> -BEGIN PGP SIGNATURE-
> Version: GnuPG/MacGPG2 v2.0.17 (Darwin)
> Comment: GPGTools - http://gpgtools.org
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
>
> iEYEARECAAYFAk+zxnYACgkQ9CaO5/Lv0PDL8ACggHJagqMHkPQ2dVFub7NUYls6
> HZIAn1celh+spZjcX7KEViyGO7iRZjVm
> =NvnK
> -END PGP SIGNATURE-
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
>
>


tomcat slowing down

2012-05-16 Thread Christian Kaufhold
Hi,

we have the problem that tomact is slowing down after a while
until even the manager app becomes unusable.

Our System:
2 Quadcores/24 GB Mem
OpenSuse 11.4
tomcat 6.0.29
wicket/hibernate/postgres

Max Memory and total Memory 2GB
Free Momory 500 MB when the system is slow
top shows 100 CPU usage by tomcat

Symptom
 System is initially ok, but is slowing down dramtically over time
when about 30 User are active

What can we do to analyse the problem?

thanks