Just an "off the cuff" guess: akka-persistence-jdbc does not provide a
ConnectionPoolSettings when creating the connection pool, which means that
the defaults will be provided, which does not contain a validation query,
which means that the only way to test the validity of the connections to
Oracle DB is via the "isValid" getter, which does not reset the idle timer
of the connection, which leads to connections timing out.

So if my guess is correct the fix is to add the proper validation query
when creating the connection pool, and if memory serves me right the common
query for this when it comes to Oracle DB is "select 1 from dual".

On Tue, Dec 23, 2014 at 11:24 PM, Miguel Vilá <miguelvi...@gmail.com> wrote:

> Thanks, Endre
>
> A colleague of mine already submitted an issue to them but we haven't
> received any response yet:
> https://github.com/dnvriend/akka-persistence-jdbc/issues/9 . Is it
> possible to have the coordinator's persistence use a different journal than
> the one used by our own persistent actors?
>
> El martes, 23 de diciembre de 2014 14:42:24 UTC-5, Akka Team escribió:
>>
>> Hi Miguel,
>>
>> This seems to be a journal issue. You should contact the maintainer of
>> the JDBC journal.
>>
>> -Endre
>>
>> On Tue, Dec 23, 2014 at 7:43 PM, Miguel Vilá <migue...@seven4n.com>
>> wrote:
>>
>>> Hi all,
>>>
>>> I'm having a problem with akka-persistence and akka-sharding. Every now
>>> and then, sometimes after running our app for a long time I get this error:
>>>
>>> DELETE FROM USERSIS.snapshot WHERE persistence_id = '/user/sharding/
>>> TokenRouterCoordinator/singleton/coordinator' AND sequence_nr = 2
>>>
>>>
>>> [ERROR] [12/18/2014 13:51:28.826] [TokenCluster-akka.actor.default-
>>> dispatcher-16] [akka://TokenCluster/system/snapshot-store] No more data
>>> to read from socket
>>> java.sql.SQLRecoverableException: No more data to read from socket
>>>     at oracle.jdbc.driver.T4CMAREngine.unmarshalUB1(T4CMAREngine.java:
>>> 1157)
>>>     at oracle.jdbc.driver.T4CTTIfun.receive(T4CTTIfun.java:350)
>>>     at oracle.jdbc.driver.T4CTTIfun.doRPC(T4CTTIfun.java:227)
>>>     at oracle.jdbc.driver.T4C8Oall.doOALL(T4C8Oall.java:531)
>>>     at oracle.jdbc.driver.T4CPreparedStatement.doOall8(T4CPreparedS
>>> tatement.java:208)
>>>     at oracle.jdbc.driver.T4CPreparedStatement.executeForRows(T4CPr
>>> eparedStatement.java:1046)
>>>     at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(Orac
>>> leStatement.java:1336)
>>>     at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(O
>>> raclePreparedStatement.java:3613)
>>>     at oracle.jdbc.driver.OraclePreparedStatement.executeUpdate(Ora
>>> clePreparedStatement.java:3694)
>>>     at oracle.jdbc.driver.OraclePreparedStatementWrapper.executeUpdate(
>>> OraclePreparedStatementWrapper.java:1354)
>>>     at org.apache.commons.dbcp.DelegatingPreparedStatement.executeUpdate
>>> (DelegatingPreparedStatement.java:105)
>>>     at org.apache.commons.dbcp.DelegatingPreparedStatement.executeUpdate
>>> (DelegatingPreparedStatement.java:105)
>>>     at scalikejdbc.StatementExecutor$$anonfun$executeUpdate$1.apply
>>> $mcI$sp(StatementExecutor.scala:337)
>>>     at scalikejdbc.StatementExecutor$$anonfun$executeUpdate$1.apply(
>>> StatementExecutor.scala:337)
>>>     at scalikejdbc.StatementExecutor$$anonfun$executeUpdate$1.apply(
>>> StatementExecutor.scala:337)
>>>     at scalikejdbc.StatementExecutor$NakedExecutor.apply(StatementE
>>> xecutor.scala:33)
>>>     at scalikejdbc.StatementExecutor$$anon$1.scalikejdbc$
>>> StatementExecutor$LoggingSQLAndTiming$$super$apply(StatementExecutor.
>>> scala:317)
>>>     at scalikejdbc.StatementExecutor$LoggingSQLAndTiming$class.apply(
>>> StatementExecutor.scala:264)
>>>     at scalikejdbc.StatementExecutor$$anon$1.scalikejdbc$
>>> StatementExecutor$LoggingSQLIfFailed$$super$apply(StatementExecutor.
>>> scala:317)
>>>     at scalikejdbc.StatementExecutor$LoggingSQLIfFailed$class.apply(
>>> StatementExecutor.scala:295)
>>>     at scalikejdbc.StatementExecutor$$anon$1.apply(StatementExecutor.
>>> scala:317)
>>>     at scalikejdbc.StatementExecutor.executeUpdate(StatementExecutor.
>>> scala:337)
>>>     at scalikejdbc.DBSession$$anonfun$updateWithFilters$1.apply(
>>> DBSession.scala:352)
>>>     at scalikejdbc.DBSession$$anonfun$updateWithFilters$1.apply(
>>> DBSession.scala:350)
>>>     at scalikejdbc.LoanPattern$class.using(LoanPattern.scala:33)
>>>     at scalikejdbc.ActiveSession.using(DBSession.scala:457)
>>>     at scalikejdbc.DBSession$class.updateWithFilters(DBSession.scala:349
>>> )
>>>     at scalikejdbc.ActiveSession.updateWithFilters(DBSession.scala:457)
>>>     at scalikejdbc.DBSession$class.updateWithFilters(DBSession.scala:327
>>> )
>>>     at scalikejdbc.ActiveSession.updateWithFilters(DBSession.scala:457)
>>>     at scalikejdbc.SQLUpdate$$anonfun$10.apply(SQL.scala:486)
>>>     at scalikejdbc.SQLUpdate$$anonfun$10.apply(SQL.scala:486)
>>>     at scalikejdbc.DBConnection$class.autoCommit(DBConnection.scala:183)
>>>     at scalikejdbc.DB.autoCommit(DB.scala:75)
>>>     at scalikejdbc.DB$$anonfun$autoCommit$1.apply(DB.scala:218)
>>>     at scalikejdbc.DB$$anonfun$autoCommit$1.apply(DB.scala:217)
>>>     at scalikejdbc.LoanPattern$class.using(LoanPattern.scala:33)
>>>     at scalikejdbc.DB$.using(DB.scala:150)
>>>     at scalikejdbc.DB$.autoCommit(DB.scala:217)
>>>     at scalikejdbc.SQLUpdate.apply(SQL.scala:486)
>>>     at akka.persistence.jdbc.snapshot.GenericStatements$class.delet
>>> eSnapshot(Statements.scala:30)
>>>     at akka.persistence.jdbc.snapshot.OracleSyncSnapshotStore.delet
>>> eSnapshot(SnapshotStores.scala:16)
>>>     at akka.persistence.jdbc.snapshot.JdbcSyncSnapshotStore$class.delete
>>> (JdbcSyncSnapshotStore.scala:34)
>>>     at akka.persistence.jdbc.snapshot.OracleSyncSnapshotStore.delete(
>>> SnapshotStores.scala:16)
>>>     at akka.persistence.snapshot.SnapshotStore$$anonfun$receive$1.a
>>> pplyOrElse(SnapshotStore.scala:44)
>>>     at akka.actor.Actor$class.aroundReceive(Actor.scala:465)
>>>     at akka.persistence.jdbc.snapshot.OracleSyncSnapshotStore.aroun
>>> dReceive(SnapshotStores.scala:16)
>>>     at akka.actor.ActorCell.receiveMessage(ActorCell.scala:516)
>>>     at akka.actor.ActorCell.invoke(ActorCell.scala:487)
>>>     at akka.dispatch.Mailbox.processMailbox(Mailbox.scala:238)
>>>     at akka.dispatch.Mailbox.run(Mailbox.scala:220)
>>>     at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPool
>>> Executor.java:1142)
>>>     at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoo
>>> lExecutor.java:617)
>>>     at java.lang.Thread.run(Thread.java:745)
>>>
>>>
>>> So it looks like the persistence of the shard coordinators is failing.
>>> We are using a jdbc journal with this plugin:
>>> https://github.com/dnvriend/akka-persistence-jdbc/ .
>>>
>>> Any idea what may be causing this?
>>>
>>> Thanks,
>>> Miguel Vilá
>>>
>>> --
>>> >>>>>>>>>> Read the docs: http://akka.io/docs/
>>> >>>>>>>>>> Check the FAQ: http://doc.akka.io/docs/akka/
>>> current/additional/faq.html
>>> >>>>>>>>>> Search the archives: https://groups.google.com/
>>> group/akka-user
>>> ---
>>> You received this message because you are subscribed to the Google
>>> Groups "Akka User List" group.
>>> To unsubscribe from this group and stop receiving emails from it, send
>>> an email to akka-user+...@googlegroups.com.
>>> To post to this group, send email to akka...@googlegroups.com.
>>> Visit this group at http://groups.google.com/group/akka-user.
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>>
>>
>>
>> --
>> Akka Team
>> Typesafe - The software stack for applications that scale
>> Blog: letitcrash.com
>> Twitter: @akkateam
>>
>  --
> >>>>>>>>>> Read the docs: http://akka.io/docs/
> >>>>>>>>>> Check the FAQ:
> http://doc.akka.io/docs/akka/current/additional/faq.html
> >>>>>>>>>> Search the archives: https://groups.google.com/group/akka-user
> ---
> You received this message because you are subscribed to the Google Groups
> "Akka User List" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to akka-user+unsubscr...@googlegroups.com.
> To post to this group, send email to akka-user@googlegroups.com.
> Visit this group at http://groups.google.com/group/akka-user.
> For more options, visit https://groups.google.com/d/optout.
>



-- 
Cheers,
√

-- 
>>>>>>>>>>      Read the docs: http://akka.io/docs/
>>>>>>>>>>      Check the FAQ: 
>>>>>>>>>> http://doc.akka.io/docs/akka/current/additional/faq.html
>>>>>>>>>>      Search the archives: https://groups.google.com/group/akka-user
--- 
You received this message because you are subscribed to the Google Groups "Akka 
User List" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to akka-user+unsubscr...@googlegroups.com.
To post to this group, send email to akka-user@googlegroups.com.
Visit this group at http://groups.google.com/group/akka-user.
For more options, visit https://groups.google.com/d/optout.

Reply via email to