tarekmed / gbif-ecat

Automatically exported from code.google.com/p/gbif-ecat
0 stars 0 forks source link

investigate if c3p0 connections must be treated special when a pg exception occurs #69

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
Since the migration to C3P0 there are warnings in the logs that look like a 
c3p0 connection should not be reused once a db exception had occurred. 
Investigate and consider closing the existing and opening a new connection if 
possible.

16:19:01.412 Inserting record 50000. Update 0, added 0. Average insert speed = 
133.45 rec/s. Since start = 110.07 rec/s
16:20:04.740 Usage probably with a non unique source id: null. Try again 
without source id. ERROR: duplicate key value violates unique constraint 
"name_usage_source_id_key"
Sep 12, 2011 4:20:04 PM com.mchange.v2.c3p0.impl.NewPooledConnection 
handleThrowable
WARNING: [c3p0] A PooledConnection that has already signalled a Connection 
error is still in use!
Sep 12, 2011 4:20:04 PM com.mchange.v2.c3p0.impl.NewPooledConnection 
handleThrowable
WARNING: [c3p0] Another error has occurred [ org.postgresql.util.PSQLException: 
ERROR: duplicate key value violates unique constraint 
"name_usage_source_id_key" ] which will not be reported to listeners!
org.postgresql.util.PSQLException: ERROR: duplicate key value violates unique 
constraint "name_usage_source_id_key"
    at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2077)
    at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1810)
    at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:257)
    at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:498)
    at org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(AbstractJdbc2Statement.java:386)
    at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:379)
    at com.mchange.v2.c3p0.impl.NewProxyPreparedStatement.execute(NewProxyPreparedStatement.java:989)
    at org.gbif.checklistbank.imports.ChecklistImportPgSql.insertStarRecords(ChecklistImportPgSql.java:1166)
    at org.gbif.checklistbank.imports.ChecklistImportPgSql.importData(ChecklistImportPgSql.java:550)
    at org.gbif.checklistbank.service.impl.ChecklistImportServicePgSql.importChecklist(ChecklistImportServicePgSql.java:134)
    at org.gbif.checklistbank.cli.CommandLineInterpreter.doImportResources(CommandLineInterpreter.java:401)
    at org.gbif.checklistbank.cli.CommandLineInterpreter.main(CommandLineInterpreter.java:161)
16:20:04.790 Usage probably with a non unique source id: null. Try again 
without source id. ERROR: duplicate key value violates unique constraint 
"name_usage_source_id_key"
Sep 12, 2011 4:20:04 PM com.mchange.v2.c3p0.impl.NewPooledConnection 
handleThrowable
WARNING: [c3p0] A PooledConnection that has already signalled a Connection 
error is still in use!
Sep 12, 2011 4:20:04 PM com.mchange.v2.c3p0.impl.NewPooledConnection 
handleThrowable
WARNING: [c3p0] Another error has occurred [ org.postgresql.util.PSQLException: 
ERROR: duplicate key value violates unique constraint 
"name_usage_source_id_key" ] which will not be reported to listeners!
org.postgresql.util.PSQLException: ERROR: duplicate key value violates unique 
constraint "name_usage_source_id_key"
    at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2077)
    at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1810)
    at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:257)
    at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:498)
    at org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(AbstractJdbc2Statement.java:386)
    at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:379)
    at com.mchange.v2.c3p0.impl.NewProxyPreparedStatement.execute(NewProxyPreparedStatement.java:989)
    at org.gbif.checklistbank.imports.ChecklistImportPgSql.insertStarRecords(ChecklistImportPgSql.java:1166)
    at org.gbif.checklistbank.imports.ChecklistImportPgSql.importData(ChecklistImportPgSql.java:550)
    at org.gbif.checklistbank.service.impl.ChecklistImportServicePgSql.importChecklist(ChecklistImportServicePgSql.java:134)
    at org.gbif.checklistbank.cli.CommandLineInterpreter.doImportResources(CommandLineInterpreter.java:401)
    at org.gbif.checklistbank.cli.CommandLineInterpreter.main(CommandLineInterpreter.java:161)
16:20:04.840 Usage probably with a non unique source id: null. Try again 
without source id. ERROR: duplicate key value violates unique constraint 
"name_usage_source_id_key"
Sep 12, 2011 4:20:04 PM com.mchange.v2.c3p0.impl.NewPooledConnection 
handleThrowable
WARNING: [c3p0] A PooledConnection that has already signalled a Connection 
error is still in use!
Sep 12, 2011 4:20:04 PM com.mchange.v2.c3p0.impl.NewPooledConnection 
handleThrowable
WARNING: [c3p0] Another error has occurred [ org.postgresql.util.PSQLException: 
ERROR: duplicate key value violates unique constraint 
"name_usage_source_id_key" ] which will not be reported to listeners!
org.postgresql.util.PSQLException: ERROR: duplicate key value violates unique 
constraint "name_usage_source_id_key"
    at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2077)
    at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1810)
    at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:257)
    at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:498)
    at org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(AbstractJdbc2Statement.java:386)
    at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:379)
    at com.mchange.v2.c3p0.impl.NewProxyPreparedStatement.execute(NewProxyPreparedStatement.java:989)
    at org.gbif.checklistbank.imports.ChecklistImportPgSql.insertStarRecords(ChecklistImportPgSql.java:1166)
    at org.gbif.checklistbank.imports.ChecklistImportPgSql.importData(ChecklistImportPgSql.java:550)
    at org.gbif.checklistbank.service.impl.ChecklistImportServicePgSql.importChecklist(ChecklistImportServicePgSql.java:134)
    at org.gbif.checklistbank.cli.CommandLineInterpreter.doImportResources(CommandLineInterpreter.java:401)
    at org.gbif.checklistbank.cli.CommandLineInterpreter.main(CommandLineInterpreter.java:161)
16:20:04.840 Usage probably with a non unique source id: null. Try again 
without source id. ERROR: duplicate key value violates unique constraint 
"name_usage_source_id_key"
Sep 12, 2011 4:20:04 PM com.mchange.v2.c3p0.impl.NewPooledConnection 
handleThrowable
WARNING: [c3p0] A PooledConnection that has already signalled a Connection 
error is still in use!
Sep 12, 2011 4:20:04 PM com.mchange.v2.c3p0.impl.NewPooledConnection 
handleThrowable
WARNING: [c3p0] Another error has occurred [ org.postgresql.util.PSQLException: 
ERROR: duplicate key value violates unique constraint 
"name_usage_source_id_key" ] which will not be reported to listeners!
org.postgresql.util.PSQLException: ERROR: duplicate key value violates unique 
constraint "name_usage_source_id_key"
    at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2077)
    at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1810)
    at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:257)
    at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:498)
    at org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(AbstractJdbc2Statement.java:386)
    at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:379)
    at com.mchange.v2.c3p0.impl.NewProxyPreparedStatement.execute(NewProxyPreparedStatement.java:989)
    at org.gbif.checklistbank.imports.ChecklistImportPgSql.insertStarRecords(ChecklistImportPgSql.java:1166)
    at org.gbif.checklistbank.imports.ChecklistImportPgSql.importData(ChecklistImportPgSql.java:550)
    at org.gbif.checklistbank.service.impl.ChecklistImportServicePgSql.importChecklist(ChecklistImportServicePgSql.java:134)
    at org.gbif.checklistbank.cli.CommandLineInterpreter.doImportResources(CommandLineInterpreter.java:401)
    at org.gbif.checklistbank.cli.CommandLineInterpreter.main(CommandLineInterpreter.java:161)
16:20:04.840 Usage probably with a non unique source id: null. Try again 
without source id. ERROR: duplicate key value violates unique constraint 
"name_usage_source_id_key"
Sep 12, 2011 4:20:04 PM com.mchange.v2.c3p0.impl.NewPooledConnection 
handleThrowable
WARNING: [c3p0] A PooledConnection that has already signalled a Connection 
error is still in use!
Sep 12, 2011 4:20:04 PM com.mchange.v2.c3p0.impl.NewPooledConnection 
handleThrowable
WARNING: [c3p0] Another error has occurred [ org.postgresql.util.PSQLException: 
ERROR: duplicate key value violates unique constraint 
"name_usage_source_id_key" ] which will not be reported to listeners!
org.postgresql.util.PSQLException: ERROR: duplicate key value violates unique 
constraint "name_usage_source_id_key"
    at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2077)
    at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1810)
    at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:257)
    at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:498)
    at org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(AbstractJdbc2Statement.java:386)
    at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:379)
    at com.mchange.v2.c3p0.impl.NewProxyPreparedStatement.execute(NewProxyPreparedStatement.java:989)
    at org.gbif.checklistbank.imports.ChecklistImportPgSql.insertStarRecords(ChecklistImportPgSql.java:1166)
    at org.gbif.checklistbank.imports.ChecklistImportPgSql.importData(ChecklistImportPgSql.java:550)
    at org.gbif.checklistbank.service.impl.ChecklistImportServicePgSql.importChecklist(ChecklistImportServicePgSql.java:134)
    at org.gbif.checklistbank.cli.CommandLineInterpreter.doImportResources(CommandLineInterpreter.java:401)
    at org.gbif.checklistbank.cli.CommandLineInterpreter.main(CommandLineInterpreter.java:161)
16:20:04.840 Usage probably with a non unique source id: null. Try again 
without source id. ERROR: duplicate key value violates unique constraint 
"name_usage_source_id_key"
Sep 12, 2011 4:20:04 PM com.mchange.v2.c3p0.impl.NewPooledConnection 
handleThrowable
WARNING: [c3p0] A PooledConnection that has already signalled a Connection 
error is still in use!
Sep 12, 2011 4:20:04 PM com.mchange.v2.c3p0.impl.NewPooledConnection 
handleThrowable
WARNING: [c3p0] Another error has occurred [ org.postgresql.util.PSQLException: 
ERROR: duplicate key value violates unique constraint 
"name_usage_source_id_key" ] which will not be reported to listeners!
org.postgresql.util.PSQLException: ERROR: duplicate key value violates unique 
constraint "name_usage_source_id_key"
    at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2077)
    at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1810)
    at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:257)
    at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:498)
    at org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(AbstractJdbc2Statement.java:386)
    at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:379)
    at com.mchange.v2.c3p0.impl.NewProxyPreparedStatement.execute(NewProxyPreparedStatement.java:989)
    at org.gbif.checklistbank.imports.ChecklistImportPgSql.insertStarRecords(ChecklistImportPgSql.java:1166)
    at org.gbif.checklistbank.imports.ChecklistImportPgSql.importData(ChecklistImportPgSql.java:550)
    at org.gbif.checklistbank.service.impl.ChecklistImportServicePgSql.importChecklist(ChecklistImportServicePgSql.java:134)
    at org.gbif.checklistbank.cli.CommandLineInterpreter.doImportResources(CommandLineInterpreter.java:401)
    at org.gbif.checklistbank.cli.CommandLineInterpreter.main(CommandLineInterpreter.java:161)
16:20:04.840 Usage probably with a non unique source id: null. Try again 
without source id. ERROR: duplicate key value violates unique constraint 
"name_usage_source_id_key"
Sep 12, 2011 4:20:04 PM com.mchange.v2.c3p0.impl.NewPooledConnection 
handleThrowable
WARNING: [c3p0] A PooledConnection that has already signalled a Connection 
error is still in use!
Sep 12, 2011 4:20:04 PM com.mchange.v2.c3p0.impl.NewPooledConnection 
handleThrowable
WARNING: [c3p0] Another error has occurred [ org.postgresql.util.PSQLException: 
ERROR: duplicate key value violates unique constraint 
"name_usage_source_id_key" ] which will not be reported to listeners!
org.postgresql.util.PSQLException: ERROR: duplicate key value violates unique 
constraint "name_usage_source_id_key"
    at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2077)
    at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1810)

Original issue reported on code.google.com by wixner@gmail.com on 30 Sep 2011 at 8:01

GoogleCodeExporter commented 8 years ago
superseded by moving to BoneCP

Original comment by wixner@gmail.com on 31 Oct 2011 at 1:13