Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Weird Error: CLOSE BY CLIENT STACK TRACE

Tags:

Hi all I have a web application which use Hibernate to retrieve data in the database. And in the server side some execeptions come out at regular interval. Below is the exception logs.

    16:04:22,227 DEBUG NewPooledConnection:491 - com.mchange.v2.c3p0.impl.NewPooledConnection@ef46613 closed by a client.     java.lang.Exception: DEBUG -- CLOSE BY CLIENT STACK TRACE         at com.mchange.v2.c3p0.impl.NewPooledConnection.close(NewPooledConnection.java:491)         at com.mchange.v2.c3p0.impl.NewPooledConnection.close(NewPooledConnection.java:191)         at com.mchange.v2.c3p0.impl.C3P0PooledConnectionPool$1PooledConnectionResourcePoolManager.destroyResource(C3P0PooledConnectionPool.java:470)         at com.mchange.v2.resourcepool.BasicResourcePool$1DestroyResourceTask.run(BasicResourcePool.java:964)         at com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread.run(ThreadPoolAsynchronousRunner.java:547)     16:09:42,310 DEBUG C3P0PooledConnectionPool:476 - Successfully destroyed PooledConnection: com.mchange.v2.c3p0.impl.NewPooledConnection@32ef0763     16:09:42,310 DEBUG BasicResourcePool:967 - Successfully destroyed resource: com.mchange.v2.c3p0.impl.NewPooledConnection@32ef0763     16:09:42,310 DEBUG GooGooStatementCache:319 - ENTER METHOD: closeAll( org.postgresql.jdbc4.Jdbc4Connection@42df0af8 )! -- num_connections: 1 

Could anyone helps me with this problem? Thanks a lot!

like image 847
John Avatar asked Dec 06 '11 16:12

John


1 Answers

This is the code that triggers this log statement in C3P0:

if ( logger.isLoggable( MLevel.FINEST ) )   logger.log( MLevel.FINEST, this + " closed by a client.",              new Exception("DEBUG -- CLOSE BY CLIENT STACK TRACE") ); 

Note that:

  1. This is not an exception, the new Exception is used merely to show execution path for debug purposes.

  2. And yes, this is only a debug message (actually, FINEST is the lowest possible level in java.util.logging).

To wrap this up: ignore and tune your logging levels to skip these.

like image 52
Tomasz Nurkiewicz Avatar answered Sep 22 '22 14:09

Tomasz Nurkiewicz