You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@jackrabbit.apache.org by jackrabbit users <ja...@gmail.com> on 2010/02/24 07:51:56 UTC

Connection Problems

I reviewed the JCR 1456 ticket that describes the connection pooling
fix for Jackrabbit 2.0, and am a little confused.

I have seen several forum postings mentioning that in previous
versions a single connection is held open per workspace, regardless of
whether a datasource is used. First and foremost, is this accurate,
and up to what version?

If this is true, this may be a problem for my group since our network
terminates long lasting idle connections. Correct me if I'm wrong
here, but I'm not aware Jackrabbit send periodic 'pings' so that the
network still thinks the connection is in use.

So the second question would be, are we doomed when connections are
terminated by the network firewall, in certain versions of Jackrabbit?

The third question is now with this 2.0 release, and connection
pooling is implemented, are we no longer holding onto that single
theoretical connection, and thus even in the case of network issues,
eventually jackrabbit will 'recover'? If so, would the mailing list
users agree that a datasource approach, with a dbcp backed connection
pool that periodically kills inactive connections be appropriate for
our situation?

Finally, as the issue is really requests to the repository are failing
sometimes for files, what debug logging is available to research
whether it's the connection holding up the request in Jackrabbit, or
if its something else?

Thanks,
Jack Rabbit

Re: Connection Problems

Posted by Thomas Müller <th...@day.com>.
Hi Jack Rabbit,

> I have seen several forum postings mentioning that in previous
> versions a single connection is held open per workspace, regardless of
> whether a datasource is used. First and foremost, is this accurate,
> and up to what version?

That's correct. Up to version 1.6 - see also the release notes:
http://www.apache.org/dist/jackrabbit/2.0.0/RELEASE-NOTES.txt

> If this is true, this may be a problem for my group since our network
> terminates long lasting idle connections. Correct me if I'm wrong
> here, but I'm not aware Jackrabbit send periodic 'pings' so that the
> network still thinks the connection is in use.

If you use Oracle I believe there is an option to send pings
periodically. I don't recall the details however.

> So the second question would be, are we doomed when connections are
> terminated by the network firewall, in certain versions of Jackrabbit?

No, on connection loss Jackrabbit automatically reconnects (since
version 1.4 I believe).

> The third question is now with this 2.0 release, and connection
> pooling is implemented, are we no longer holding onto that single
> theoretical connection, and thus even in the case of network issues,
> eventually jackrabbit will 'recover'?

Jackrabbit will 'recover' in all versions (not only 2.0).

> Finally, as the issue is really requests to the repository are failing
> sometimes for files, what debug logging is available to research
> whether it's the connection holding up the request in Jackrabbit, or
> if its something else?

I don't know about logging. In case a process is blocked I usually use:

jps -l
jstack <pid>

Regards,
Thomas