[daisy] connection pool exhausted
Bruno Dumon
bruno at outerthought.org
Tue Mar 6 11:28:04 CST 2007
On Tue, 2007-03-06 at 17:09 +0100, Tom Brusselle wrote:
> Bruno Dumon wrote:
> >
> > Yes, this can be done in the myconfig.xml. The number of connections
> > doesn't need to be much higher than the number of concurrent users
> > though.
>
> Exactly what parameter should i be looking at? i found only the
> following entries. Could it be that i'm running into this maxActive limit?
That's indeed the limit you're running into.
> (20 concurrent users editing a page could be possible, 20 users
> concurrently requesting or saving a page would be very unlikely and very
> quickly resolved, 5000 concurrent users would not be possible)
Yes indeed.
>
> <target path="/daisy/datasource/datasource">
> <configuration>
> ...
> <maxActive>20</maxActive>
> <maxIdle>8</maxIdle>
> <minIdle>0</minIdle>
> <maxWait>5000</maxWait>
> </configuration>
> </target>
>
>
> >
> >> (or could it is possible that connections somehow don't get
> >> released over time and that's wy we eventually run out?)
> >
> > Seems like connections are leaking somewhere, it would be interesting to
> > know where. Is the Daisy repository server customized in some way? (such
> > as a custom authentication scheme).
>
> no, we're using a standard daisy 1.5.1, with the built in daisy
> authentication scheme. The only customizations are the fact that we run
> daisy under tomcat and that we use non-default ports.
ok, I just wanted to rule out that possibility.
>
> I'd also like to see where the connections are going but i'm not a big
> java debugger/devoloper so if that's possible please let me me how.
>
The connection pool we use (Jakarta commons DBCP) has a feature to log a
stack trace of where "abandoned connections" (= connections not released
after a certain timeout) were obtained. I have no experience using it,
and it requires a change in Daisy to be able to activate it.
If you can easily reproduce this error, I could look into supplying you
an updated daisy-datasource jar in which this logging feature is
enabled.
Or you can look into doing it yourself: the code is in the Daisy source
tree in services/datasource, you only need to recompile that subproject
and throw the resulting jar over the corresponding one in your Daisy
install.
--
Bruno Dumon http://outerthought.org/
Outerthought - Open Source, Java & XML Competence Support Center
bruno at outerthought.org bruno at apache.org
More information about the daisy
mailing list