[QFJ-571] QFJ Timer - JDBCStore reset issues Created: 20/Dec/10  Updated: 08/Apr/14  Resolved: 08/Apr/14

Status: Closed
Project: QuickFIX/J
Component/s: Engine
Affects Version/s: 1.5.0
Fix Version/s: None

Type: Bug Priority: Major
Reporter: Vid Cheruvu Assignee: Unassigned
Resolution: Duplicate Votes: 0
Labels: None

Issue Links:
Duplicate
duplicates QFJ-645 Deadlock between message sending and ... Resolved
duplicates QFJ-700 QFJ Timer and QFJ message processor t... Closed

 Description   

Hi,

I have configured QuickFixJ to use JDBC store. In doing so, we have seen an issue with Proxool where it kills active thread that are longer than 5 minutes. We have no way to change the proxool's maximum-active-time property in Quickfixj configuration. When proxool kills the thread, QFJ failed to perform Scheduled Session reset. Please see the error log as shown below.

2010-12-18 09:32:07,312 WARN [HouseKeeper] HouseKeeper.sweep:149 - #0007 was active for 5559 milliseconds and has been removed automaticaly. Th
e Thread responsible was named 'QFJ Timer', but the last SQL it performed is unknown because the trace property is not enabled.
2010-12-18 09:32:07,316 ERROR [QFJ Timer] SessionConnector$SessionTimerTask.run:257 - Error during timer processing
quickfix.RuntimeError: java.io.IOException: Couldn't perform the operation prepareStatement: You can't perform any operations on this connection
. It has been automatically closed by Proxool for some reason (see logs).
at quickfix.SessionState.reset(SessionState.java:373)
at quickfix.Session.resetState(Session.java:2191)
at quickfix.Session.reset(Session.java:759)
at quickfix.Session.next(Session.java:1699)
at quickfix.mina.SessionConnector$SessionTimerTask.run(SessionConnector.java:251)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
at java.util.concurrent.FutureTask$Sync.innerRunAndReset(FutureTask.java:317)
at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:150)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$101(ScheduledThreadPoolExecutor.java:98)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.runPeriodic(ScheduledThreadPoolExecutor.java:181)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:205)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:619)
Caused by: java.io.IOException: Couldn't perform the operation prepareStatement: You can't perform any operations on this connection. It has bee
n automatically closed by Proxool for some reason (see logs).
at quickfix.JdbcStore.reset(JdbcStore.java:195)
at quickfix.SessionState.reset(SessionState.java:370)
... 13 more
Caused by: java.sql.SQLException: Couldn't perform the operation prepareStatement: You can't perform any operations on this connection. It has b
een automatically closed by Proxool for some reason (see logs).
at org.logicalcobwebs.proxool.WrappedConnection.invoke(WrappedConnection.java:207)
at org.logicalcobwebs.proxool.WrappedConnection.intercept(WrappedConnection.java:87)
at com.sybase.jdbcx.SybConnection$$EnhancerByProxool$$ace6c3d2.prepareStatement(<generated>)
at quickfix.JdbcStore.reset(JdbcStore.java:187)
... 14 more

Kind Regards,
Vid



 Comments   
Comment by Christoph John [ 16/Oct/12 ]

There were some synchronization problems around the Session.reset() method which might have caused this. Could you please try with QF/J 1.5.3 as soon as it is released (October/November 2012) and let us know if the problem still persists?

Thanks, Chris.

Comment by Lucian Hada [ 12/Nov/12 ]

Hi, we have the same issue using 1.5.0 and I don't see 1.5.3 out yet. Any chance this will get away with 1.5.2?
Thanks,
Lucian

Comment by Christoph John [ 12/Nov/12 ]

It is likely that the problem is still present on 1.5.2. I'm not even sure that it is fixed with 1.5.3 but it is quite likely since QFJ-645 and QFJ-700 had similar problems when trying to reset the sequence numbers.

Comment by Lucian Hada [ 12/Nov/12 ]

Thanks for answer. Are there any recommended workarounds? I didn't managed to reproduce this in a controlled test but it seems to me that once it occurred the sequence won't reset even if we restart the application and we don't see the exception anymore. Using MySQL btw.

Comment by Christoph John [ 13/Nov/12 ]

In the other issues I mentioned the problem was that there were messages sent and the session reset was done at the same time. Maybe you could define with your counterparty that they log off some time before your session's EndTime is reached. That way you could make sure that there are no messages exchanged while QF/J tries to reset the seqnums. This is the only workaround that I could think of at the moment.

Generated at Sat Nov 23 09:08:20 UTC 2024 using JIRA 7.5.2#75007-sha1:9f5725bb824792b3230a5d8716f0c13e296a3cae.