[jcifs] & quot; DCERPC pipe is no longer open& quot; in DcerpcPipeHandle.doSendFragment()

Michael B Allen ioplex at gmail.com
Wed Aug 18 11:55:10 MDT 2010

On Wed, Aug 18, 2010 at 2:53 AM, Marasim <marasim at gmail.com> wrote:
> Michael B Allen <ioplex <at> gmail.com> writes:
>> Hi Marasim,
>> If you have a retry loop, why do you care if JCIFS has to reopen the pipe?
>> If a connection is idle for longer than jcifs.smb.client.soTimeout
>> milliseconds, it will be closed to conserve resources. This is by
>> design.
>> Mike
> Hi Mike,
> Thanks again for your reply.
> I do have to care, because it is affecting the performance of my application
> (closing and reopening connections become expensive when a large number of hosts
> are involved that I use to connect using JCIFS).
> So looks like I should be able to set a higher value for
> jcifs.smb.client.soTimeout to test if that helps the performance.

Hi Marasim,

Actually that could have the opposite effect. If you really have that
many connections open, all of those sockets use a lot of memory. JCIFS
closes those connections specifically to free that memory. If you
increase soTimeout to keep idle connections open, you may pressure VM
memory and performance could actually decrease.

It all depends on how frequently you're using the connection. If it's
every consistently 60 or 120 seconds (like a network monitor agent),
then increasing the soTimeout might be better than the default of 35
because you know the connection is going to be used again very soon.
If it's every 5 minutes or longer or the timing is unpredictable, then
I would use the default soTimeout. Try both ways and measure.


Michael B Allen
Java Active Directory Integration

More information about the jCIFS mailing list