ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Zsolt Koppany <zkoppanyl...@intland.com>
Subject Re: Does ping really work?
Date Mon, 15 Jun 2009 15:10:14 GMT
Thank you Larry,

I also found that at startup we get a connection from the pool that is 
not closed. But as far as I understand "Pool.MaximumCheckoutTime" should 
guarantee that a connection cannot be used longer that 20 seconds (in 
our case).

Do I miss something?

Zsolt

Larry Meadors wrote:
> Google is your friend:
> 
> http://forums.mysql.com/read.php?39,199085,204628#msg-204628
> 
> Larry
> 
> On Mon, Jun 15, 2009 at 3:39 AM, Zsolt Koppany<zkoppanylist@intland.com> wrote:
>> Hi,
>>
>> I get an exception attached at the end. Here are the ibatis pool properties:
>>
>> Pool.MaximumActiveConnections=20
>> Pool.MaximumIdleConnections=5
>> Pool.MaximumCheckoutTime=20000
>> Pool.TimeToWait=20000
>> Pool.PingEnabled=true
>> Pool.PingQuery=SELECT 1 FROM always_one_row
>> Pool.PingConnectionsOlderThan=0
>> Pool.PingConnectionsNotUsedFor=5000
>>
>> How is it possible getting this exception? "Pool.PingConnectionsNotUsedFor"
>> is set to 5 seconds and mysql complains that last packet was sent 758278
>> seconds ago. As far as I understand for connections older than 5 seconds the
>> ping command should be executed and if not successful a new connection
>> created.
>>
>> I use ibatis-2.3.4.726. Does anybody have an idea?
>>
>> Zsolt
>>
>> 2009-06-14 14:31:19,167 ERROR dao.impl.ProjectDaoImpl     - iBATIS exception
>> [TP-Processor489]
>> com.ibatis.common.jdbc.exception.NestedSQLException:
>> --- The error occurred while applying a parameter map.
>> --- Check the findProject-InlineParameterMap.
>> --- Check the statement (query failed).
>> --- Cause: com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: The last
>> packet successfully received from the server was758278 seconds ago.The last
>> packet sent successfully to the server was 758278 seconds ago, which  is
>> longer than the server configured value of 'wait_timeout'. You should
>> consider either expiring and/or testing connection validity before use in
>> your application, increasing the server configured values for client
>> timeouts, or using the Connector/J connection property 'autoReconnect=true'
>> to avoid this problem.
>>        at
>> com.ibatis.sqlmap.engine.mapping.statement.MappedStatement.executeQueryWithCallback(MappedStatement.java:201)
>>        at
>> com.ibatis.sqlmap.engine.mapping.statement.MappedStatement.executeQueryForList(MappedStatement.java:139)
>>        at
>> com.ibatis.sqlmap.engine.impl.SqlMapExecutorDelegate.queryForList(SqlMapExecutorDelegate.java:567)
>>        at
>> com.ibatis.sqlmap.engine.impl.SqlMapSessionImpl.queryForList(SqlMapSessionImpl.java:126)
>>        at
>> com.ibatis.sqlmap.engine.impl.SqlMapClientImpl.queryForList(SqlMapClientImpl.java:102)
>>        at
>> com.intland.codebeamer.persistence.util.SqlMapClientWrapper.queryForList(SqlMapClientWrapper.java:345)
>>
>>
> 

Mime
View raw message