SVNGanymedSession causes memory leak?

View: New views
4 Messages — Rating Filter:   Alert me  

SVNGanymedSession causes memory leak?

by Zsolt Koppany :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi,

We use svnkit-1.1.4.3622. We got a out-of-memory exception. The ibm-heap
analyzer shows that SVNGanymedSession helds 192MB memory.

Is it possible that SVNGanymedSession causes memory leak?

Zsolt


Re: SVNGanymedSession causes memory leak?

by Alexander Kitaev-3 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hello Zsolt,

 > We use svnkit-1.1.4.3622. We got a out-of-memory exception. The ibm-heap
 > analyzer shows that SVNGanymedSession helds 192MB memory.
May I ask you to check it with 1.1.6 version of SVNKit?

In general, SSH connections are kept in pool with 10-minutes inactivity
timeout. So, in case your application creates too many SSH connections
in a short time and does not call SVNClient(Manager).dispose() when it
is no longer needed, all those connections may still be in memory in the
moment dump is taken.

However, 192 MB is anyway too much for connections pool. Since version
1.1.4 there was another memory-related problem fixed - it revealed
itself when SVNClient (JavaHL API implementation) was used - created
SVNClient instances were added to the static cache, but never disposed.

So, I'd recommend you to try version 1.1.6 and, if possible, send me the
dump you have. Thanks!

Alexander Kitaev,
TMate Software,
http://svnkit.com/ - Java [Sub]Versioning Library!

Zsolt Koppany wrote:

> Hi,
>
> We use svnkit-1.1.4.3622. We got a out-of-memory exception. The ibm-heap
> analyzer shows that SVNGanymedSession helds 192MB memory.
>
> Is it possible that SVNGanymedSession causes memory leak?
>
> Zsolt
>
>

RE: SVNGanymedSession causes memory leak?

by Zsolt Koppany :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

I will try it.

Is it possible to disable all connection pools?

Zsolt

> -----Original Message-----
> From: Alexander Kitaev [mailto:Alexander.Kitaev@...]
> Sent: Tuesday, April 01, 2008 7:00 PM
> To: javasvn-users@...
> Subject: Re: SVNGanymedSession causes memory leak?
>
> Hello Zsolt,
>
>  > We use svnkit-1.1.4.3622. We got a out-of-memory exception. The ibm-
> heap
>  > analyzer shows that SVNGanymedSession helds 192MB memory.
> May I ask you to check it with 1.1.6 version of SVNKit?
>
> In general, SSH connections are kept in pool with 10-minutes inactivity
> timeout. So, in case your application creates too many SSH connections
> in a short time and does not call SVNClient(Manager).dispose() when it
> is no longer needed, all those connections may still be in memory in the
> moment dump is taken.
>
> However, 192 MB is anyway too much for connections pool. Since version
> 1.1.4 there was another memory-related problem fixed - it revealed
> itself when SVNClient (JavaHL API implementation) was used - created
> SVNClient instances were added to the static cache, but never disposed.
>
> So, I'd recommend you to try version 1.1.6 and, if possible, send me the
> dump you have. Thanks!
>
> Alexander Kitaev,
> TMate Software,
> http://svnkit.com/ - Java [Sub]Versioning Library!
>
> Zsolt Koppany wrote:
> > Hi,
> >
> > We use svnkit-1.1.4.3622. We got a out-of-memory exception. The ibm-heap
> > analyzer shows that SVNGanymedSession helds 192MB memory.
> >
> > Is it possible that SVNGanymedSession causes memory leak?
> >
> > Zsolt
> >
> >


Re: SVNGanymedSession causes memory leak?

by Alexander Kitaev-3 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hello Zsolt,

You may disable SSH connections pooling by setting the following System
property:

svnkit.ssh2.persistent=false

This will make SVNKit establish new SSH connection for each operation.

There is also pool of SVNRepository objects with underlying connections
- that pool keeps single SVNRepository object for each protocol used
(svn, svn+ssh, http, etc) and in general couldn't be disabled.

There is such pool per SVNClientManager (or SVNClient(Impl) instance) -
to make sure there is limited amount of such caches one have to call
SVNClientManager.dispose() or SVNClient.dispose() as long as
SVNClientManager or SVNClient is no longer needed. However, this pool
also closes connections on inactivity timeout.

Alexander Kitaev,
TMate Software,
http://svnkit.com/ - Java [Sub]Versioning Library!

Zsolt Koppany wrote:

> I will try it.
>
> Is it possible to disable all connection pools?
>
> Zsolt
>
>> -----Original Message-----
>> From: Alexander Kitaev [mailto:Alexander.Kitaev@...]
>> Sent: Tuesday, April 01, 2008 7:00 PM
>> To: javasvn-users@...
>> Subject: Re: SVNGanymedSession causes memory leak?
>>
>> Hello Zsolt,
>>
>>  > We use svnkit-1.1.4.3622. We got a out-of-memory exception. The ibm-
>> heap
>>  > analyzer shows that SVNGanymedSession helds 192MB memory.
>> May I ask you to check it with 1.1.6 version of SVNKit?
>>
>> In general, SSH connections are kept in pool with 10-minutes inactivity
>> timeout. So, in case your application creates too many SSH connections
>> in a short time and does not call SVNClient(Manager).dispose() when it
>> is no longer needed, all those connections may still be in memory in the
>> moment dump is taken.
>>
>> However, 192 MB is anyway too much for connections pool. Since version
>> 1.1.4 there was another memory-related problem fixed - it revealed
>> itself when SVNClient (JavaHL API implementation) was used - created
>> SVNClient instances were added to the static cache, but never disposed.
>>
>> So, I'd recommend you to try version 1.1.6 and, if possible, send me the
>> dump you have. Thanks!
>>
>> Alexander Kitaev,
>> TMate Software,
>> http://svnkit.com/ - Java [Sub]Versioning Library!
>>
>> Zsolt Koppany wrote:
>>> Hi,
>>>
>>> We use svnkit-1.1.4.3622. We got a out-of-memory exception. The ibm-heap
>>> analyzer shows that SVNGanymedSession helds 192MB memory.
>>>
>>> Is it possible that SVNGanymedSession causes memory leak?
>>>
>>> Zsolt
>>>
>>>
>
>