|
|
|
|
|
|
In our application we use db connection pooling at the servlet container level - Jetty instantiates a {{ com.mchange.v2.c3p0.ComboPooledDataSource }} . We've disabled Hibernate's connection pooling to avoid multiple connection pools.
Soon after starting to use {{ MassIndexer }} we noticed that it SOMETIMES freezes during operation - {{ startAndWait() }}. It just hangs indefinitely. After some experimentation, we realized that during this freeze the connection pool is maxed out and all the 15 connections (c3p0's default value for {{ maxPoolSize }} is 15) are active.
We therefore experimented with various values for {{ maxPoolSize }} and found that 10 or less always seems to cause freezes, whereas 20 or more seems to work fine consistently. In between is a grey area, where the freeze occurs inconsistently (this grey area may of course extend to {{ maxPoolSize<=10 }} and/or {{ maxPoolSize>=20 }} , since our tests only provide a partial statistical sample).
If this is expected behavior, the minimal pool size / number of required connections should be well documented.
|
|
|
|
|
|