I’m using Cayenne’s internal mechanism for everything related to the DB and 
currently using 4.0.M4-SNAPSHOT. The stack trace we were getting (after 
restarting the DB, and the EOF programs had started working) was:

Caused by: 
org.apache.cayenne.datasource.UnmanagedPoolingDataSource$ConnectionUnavailableException:
 Can't obtain connection. Request to pool timed out. Total pool size: 0
        at 
org.apache.cayenne.datasource.UnmanagedPoolingDataSource.getConnection(UnmanagedPoolingDataSource.java:339)
        at 
org.apache.cayenne.datasource.ManagedPoolingDataSource.getConnection(ManagedPoolingDataSource.java:80)
        at 
org.apache.cayenne.access.DataNode$TransactionDataSource.getConnection(DataNode.java:372)
        at org.apache.cayenne.access.DataNode.performQueries(DataNode.java:286)


I’ve added setting a validationQuery on my ServerRuntimeBuilder, perhaps that 
will help the next time. I’ll test it some more tonight.

Thanks!
- hugi



> On 29. feb. 2016, at 14:12, Michael Gentry <[email protected]> wrote:
> 
> Hi Hugi,
> 
> I don't know the nature of your application.  I've used Cayenne's native
> connection pooling (stand-alone applications) and JNDI (typically based on
> Apache Commons DBCP) in the past.  If my memory is correct, Cayenne's
> native connection pooling does attempt to do a re-connect on failure.  for
> JNDI, you probably have to tell the JDBC connector to auto-reconnect.  If
> you are using Cayenne's native and it didn't re-connect, we might have an
> issue to explore.  What version of Cayenne are you using?
> 
> Thanks,
> 
> mrg
> 
> 
> On Mon, Feb 29, 2016 at 8:14 AM, Hugi Thordarson <[email protected]> wrote:
> 
>> Hi Michael,
>> I’m not quite sure, I’m just giving Cayenne my connection information.
>> Should I be using a different mechanism?
>> 
>> Cheers,
>> - hugi
>> 
>> 
>> 
>>> On 29. feb. 2016, at 13:10, Michael Gentry <[email protected]>
>> wrote:
>>> 
>>> Hi Hugi,
>>> 
>>> Just out of curiosity, which connection pooling mechanism were you using?
>>> I've seen Cayenne automatically re-connect to PostgreSQL before.
>>> 
>>> mrg
>>> 
>>> 
>>> On Mon, Feb 29, 2016 at 6:26 AM, Hugi Thordarson <[email protected]>
>> wrote:
>>> 
>>>> Ah, awesome. Added to my config :).
>>>> 
>>>> Cheers,
>>>> - hugi
>>>> 
>>>> 
>>>> 
>>>>> On 29. feb. 2016, at 11:25, Andrus Adamchik <[email protected]>
>>>> wrote:
>>>>> 
>>>>> 
>>>>>> On Feb 29, 2016, at 2:20 PM, Hugi Thordarson <[email protected]>
>> wrote:
>>>>>> 
>>>>>> What does validationQuery do?
>>>>> 
>>>>> Periodically executes for each pooled connection, and kills connections
>>>> that throw during validation. So it ensures that all pooled connections
>> are
>>>> in a good state.
>>>>> 
>>>>> Andrus
>>>>> 
>>>> 
>>>> 
>> 
>> 

Reply via email to