thank you very much Atsuhiko .
That worked.

thanks,
Prakash

--- On Thu, 3/3/11, Atsuhiko Yamanaka <y...@jcraft.com> wrote:

From: Atsuhiko Yamanaka <y...@jcraft.com>
Subject: Re: [JSch-users] com.jcraft.jsch.Session objects clogging the heap
To: jprakashb...@yahoo.co.in
Cc: jsch-users@lists.sourceforge.net
Date: Thursday, March 3, 2011, 9:33 PM

Hi,

   +-From: prakash babu <jprakashb...@yahoo.co.in> --
   |_Date: Thu, 3 Mar 2011 15:24:19 +0530 (IST) _____
   |
   |I have a web applications which installs software using jsch on remote 
machines. 
   |During a single install I almost connect 30 times to the remote host, 
   |each time executing some command. After each command i close the channel 
and session.
   |Inspite of this com.jcraft.jsch.ChannelX11.fake_cookie_pool and 
   |com.jcraft.jsch.ChannelX11.fake_cookie_hex_pool still hold references to 
   |the com.jcraft.jsch.Session objects and hence they are not garbage 
collected.
   |If 10 installs are performed using my application. 10*30=300 instances of 
   |com.jcraft.jsch.Session are present in the heap.
   |Is there a way to resolve this ?

Do you really need the X forwarding?
If no, you can work around that problem by 
stopping to invoke channel.setXForwarding(true);


Sincerely,
--
Atsuhiko Yamanaka
JCraft,Inc.
1-14-20 HONCHO AOBA-KU,
SENDAI, MIYAGI 980-0014 Japan.
Tel +81-22-723-2150
    +1-415-578-3454
Skype callto://jcraft/
Twitter: http://twitter.com/ymnk



      
------------------------------------------------------------------------------
What You Don't Know About Data Connectivity CAN Hurt You
This paper provides an overview of data connectivity, details
its effect on application quality, and explores various alternative
solutions. http://p.sf.net/sfu/progress-d2d
_______________________________________________
JSch-users mailing list
JSch-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jsch-users

Reply via email to