Closed olegs closed 3 years ago
After removing concurrent update:
SQL: [Failed on expanding args for DELETE: org.jetbrains.exposed.sql.statements.DeleteStatement@2b9ed6da]
at org.jetbrains.exposed.sql.statements.Statement.executeIn$exposed(Statement.kt:61)
at org.jetbrains.exposed.sql.Transaction.exec(Transaction.kt:128)
at org.jetbrains.exposed.sql.Transaction.exec(Transaction.kt:122)
at org.jetbrains.exposed.sql.statements.Statement.execute(Statement.kt:29)
at org.jetbrains.exposed.sql.statements.DeleteStatement$Companion.where(DeleteStatement.kt:24)
at org.jetbrains.exposed.sql.QueriesKt.deleteWhere(Queries.kt:28)
at org.jetbrains.exposed.sql.QueriesKt.deleteWhere$default(Queries.kt:27)
at org.jetbrains.bio.pubtrends.db.PubmedPostgresWriter$delete$1.invoke(PubmedPostgresWriter.kt:154)
at org.jetbrains.bio.pubtrends.db.PubmedPostgresWriter$delete$1.invoke(PubmedPostgresWriter.kt:11)
at org.jetbrains.exposed.sql.transactions.ThreadLocalTransactionManagerKt.inTopLevelTransaction(ThreadLocalTransactionManager.kt:103)
at org.jetbrains.exposed.sql.transactions.ThreadLocalTransactionManagerKt.transaction(ThreadLocalTransactionManager.kt:74)
at org.jetbrains.exposed.sql.transactions.ThreadLocalTransactionManagerKt.transaction(ThreadLocalTransactionManager.kt:57)
at org.jetbrains.exposed.sql.transactions.ThreadLocalTransactionManagerKt.transaction$default(ThreadLocalTransactionManager.kt:57)
at org.jetbrains.bio.pubtrends.db.PubmedPostgresWriter.delete(PubmedPostgresWriter.kt:150)
at org.jetbrains.bio.pubtrends.pm.PubmedXMLParser.parseData(PubmedXMLParser.kt:452)
at org.jetbrains.bio.pubtrends.pm.PubmedXMLParser.parse(PubmedXMLParser.kt:95)
at org.jetbrains.bio.pubtrends.pm.PubmedCrawler.downloadAndProcessFiles(PubmedCrawler.kt:137)
at org.jetbrains.bio.pubtrends.pm.PubmedCrawler.update(PubmedCrawler.kt:83)
at org.jetbrains.bio.pubtrends.pm.PubmedLoader.main(PubmedLoader.kt:96)
Caused by: org.postgresql.util.PSQLException: An I/O error occurred while sending to the backend.
at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:333)
at org.postgresql.jdbc.PgStatement.executeInternal(PgStatement.java:441)
at org.postgresql.jdbc.PgStatement.execute(PgStatement.java:365)
at org.postgresql.jdbc.PgPreparedStatement.executeWithFlags(PgPreparedStatement.java:155)
at org.postgresql.jdbc.PgPreparedStatement.executeUpdate(PgPreparedStatement.java:132)
at org.jetbrains.exposed.sql.statements.DeleteStatement.executeInternal(DeleteStatement.kt:11)
at org.jetbrains.exposed.sql.statements.DeleteStatement.executeInternal(DeleteStatement.kt:6)
at org.jetbrains.exposed.sql.statements.Statement.executeIn$exposed(Statement.kt:59)
... 18 more
Caused by: java.io.IOException: Tried to send an out-of-range integer as a 2-byte value: 33430
at org.postgresql.core.PGStream.sendInteger2(PGStream.java:224)
at org.postgresql.core.v3.QueryExecutorImpl.sendParse(QueryExecutorImpl.java:1440)
at org.postgresql.core.v3.QueryExecutorImpl.sendOneQuery(QueryExecutorImpl.java:1762)
at org.postgresql.core.v3.QueryExecutorImpl.sendQuery(QueryExecutorImpl.java:1326)
at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:298)
... 25 more
org.postgresql.core.v3.QueryExecutorImpl
supports no more than MAX_SHORT number of arguments per query, here in attempt to remove 16715 papers, we generate query with 2* 16715 params, which exceeds the threshold.
Exception during Pubmed DB update:
java -cp ~/pubtrends-0.9.786.jar org.jetbrains.bio.pubtrends.pm.PubmedLoader --fillDatabase | tee -a ~/postgres-write.log
Exception: