jackrabbit-oak-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Julian Reschke (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (OAK-4082) Don't pool prepared statements using lists
Date Fri, 04 Mar 2016 12:07:40 GMT

    [ https://issues.apache.org/jira/browse/OAK-4082?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15179799#comment-15179799
] 

Julian Reschke commented on OAK-4082:
-------------------------------------

So it seems this has to do with how the mysql java connector maintains the preparedStatementCache
on the server. It apparently tries not to exceed the server threshold, and fails in our case.
It seems to occur only when the connection parameters rewriteBatchedStatements=true and useServerPrepStmts=true
are present.

> Don't pool prepared statements using lists
> ------------------------------------------
>
>                 Key: OAK-4082
>                 URL: https://issues.apache.org/jira/browse/OAK-4082
>             Project: Jackrabbit Oak
>          Issue Type: Bug
>          Components: rdbmk
>            Reporter: Tomek Rękawek
>            Assignee: Julian Reschke
>             Fix For: 1.6
>
>         Attachments: OAK-4082.patch
>
>
> In the RDBDocumentStoreJDBC we should invoke {{setPoolable(false)}} on all prepared statements
containing a list of ids. Otherwise we can get exceptions like this:
> {noformat}
> 15:45:58 Caused by: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Can't
create more than max_prepared_stmt_count statements (current value: 16382)
> 15:45:58 	at sun.reflect.GeneratedConstructorAccessor23.newInstance(Unknown Source)
> 15:45:58 	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
> 15:45:58 	at java.lang.reflect.Constructor.newInstance(Constructor.java:526)
> 15:45:58 	at com.mysql.jdbc.Util.handleNewInstance(Util.java:400)
> 15:45:58 	at com.mysql.jdbc.Util.getInstance(Util.java:383)
> 15:45:58 	at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:980)
> 15:45:58 	at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3847)
> 15:45:58 	at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3783)
> 15:45:58 	at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:2447)
> 15:45:58 	at com.mysql.jdbc.ServerPreparedStatement.serverPrepare(ServerPreparedStatement.java:1514)
> 15:45:58 	at com.mysql.jdbc.ServerPreparedStatement.<init>(ServerPreparedStatement.java:389)
> 15:45:58 	at com.mysql.jdbc.ServerPreparedStatement.prepareBatchedInsertSQL(ServerPreparedStatement.java:2832)
> 15:45:58 	at com.mysql.jdbc.PreparedStatement.executeBatchedInserts(PreparedStatement.java:1524)
> 15:45:58 	at com.mysql.jdbc.PreparedStatement.executeBatch(PreparedStatement.java:1262)
> 15:45:58 	at org.apache.jackrabbit.oak.plugins.document.rdb.RDBDocumentStoreJDBC.insert(RDBDocumentStoreJDBC.java:302)
> 15:45:58 	at org.apache.jackrabbit.oak.plugins.document.rdb.RDBDocumentStoreJDBC.update(RDBDocumentStoreJDBC.java:446)
> 15:45:58 	at org.apache.jackrabbit.oak.plugins.document.rdb.RDBDocumentStore.bulkUpdate(RDBDocumentStore.java:456)
> 15:45:58 	... 21 more
> {noformat}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message