RE: [Quickfix-developers] Session Resetting
Brought to you by:
orenmnero
|
From: Steinberg, J. <Jon...@bo...> - 2006-03-02 02:24:12
|
I am wondering if the problem I am having is caused by the creation date
in my session store.
It appears that if the current UTC time is greater than one day than the
creation time, it will reset under certain conditions.
00097
00098 bool SessionTime::isSameSession( const UtcTimeOnly& start,
00099 const UtcTimeOnly& end,
00100 const UtcTimeStamp& time1,
00101 const UtcTimeStamp& time2 )
00102 { QF_STACK_PUSH(SessionTime::isSameSession)
00103
00104 if ( !isSessionTime( start, end, time1 ) ) return false;
00105 if ( !isSessionTime( start, end, time2 ) ) return false;
00106
00107 if ( time1 == time2 ) return true;
00108
00109 UtcDate time1Date( time1 );
00110 UtcDate time2Date( time2 );
00111
00112 if ( start < end || start == end )
00113 return time1Date == time2Date;
00114 else if( start > end )
00115 return labs(time1 - time2) < UTC_DAY;
00116 return false;
00117
Now, if my current time is a day later than the creation time, it will
reset.
I have been using a MS SQLServer store implementation, copied from the
MySqlStore, and the problem may be there. This is in conjunction with
the fact that my service has gotten bounced at odd hours in the past,
which may have caused the creation times to be wacky.
I will monitor the session creation times, and see if this was indeed
the problem.
Jonathan Steinberg
-----Original Message-----
From: Steinberg, Jonathan
Sent: Wednesday, March 01, 2006 3:06 PM
To: 'Oren Miller'
Cc: John Hensley; qui...@li...
Subject: RE: [Quickfix-developers] Session Resetting
I have an additional question regarding my problem:
I had the session log itself out yesterday morning, and the logout
request was not acknowledged by the counter party. My sessions are
configured to start at 5 AM. At 5 AM, the logout messages are continuing
to be sent out by the engine. The session is not being recreated, just
the messages are not being sent until that point.
What is the relation between the session start time and the session
creation logic?
Would it be possible that the logic for determining the start and end
time for the messages has become disconnected from the actual session
reset logic?
Thanks
Jonathan Steinberg
-----Original Message-----
From: Oren Miller [mailto:or...@qu...]
Sent: Tuesday, February 28, 2006 7:45 PM
To: Steinberg, Jonathan
Cc: John Hensley; qui...@li...
Subject: Re: [Quickfix-developers] Session Resetting
Well it can happen if the counterparty requests a sequence reset on
logon. Doesn't seem to be the likely cause in this case. It happens
when the session time expires as you know. There is also a reset method
and methods to set the sequence numbers which can be called by anyone.
I'll investigate the code to see if there is some other possibility.
Hopefully your logs can be used to create a test case which might expose
something.
--oren
Steinberg, Jonathan wrote:
>It happens sporadically. I can't reproduce it at will.
>
>It happened on 2/24/06 at 11:58 am for both of the sessions I have set
>up, and again today (2/28) at 9:43 am for one session, and at 2:30 Pm
>for another session
>It could certainly have been some problem in my application, but I
can't
>find out what it is. I am really looking for ideas as to where to
look;
>It would be helpful to know what else would cause a logout/reset to
>happen, other than the session times defined in the config file.
>
>Thanks again
>
>Jonathan Steinberg
>
>
>-----Original Message-----
>From: Oren Miller [mailto:or...@qu...]
>Sent: Tuesday, February 28, 2006 12:57 PM
>To: Steinberg, Jonathan
>Cc: John Hensley; qui...@li...
>Subject: Re: [Quickfix-developers] Session Resetting
>
>How often does this happen Jonathan. Is it repeatable? Does it happen
>everyday?
>
>--oren
>
>Steinberg, Jonathan wrote:
>
>
>
>>Regarding your comment about the dropping connection being wrong-
>>
>>I was also suspicious of this. After a logout caused by a incorrect
>>seq num, shouldn't the counter party then accept a logon with the
>>correct seq num?
>>
>>Thanks again for your help
>>
>>Jonathan Steinberg
>>
>>
>>
>>
>-----------------------------------------------------------------------
-
>
>
>>*From:* qui...@li...
>>[mailto:qui...@li...] *On Behalf Of
>>
>>
>
>
>
>>*John Hensley
>>*Sent:* Tuesday, February 28, 2006 7:24 AM
>>*To:* qui...@li...
>>*Subject:* RE: [Quickfix-developers] Session Resetting
>>
>>Right, but things are OK from there until just before noon. Then for
>>some reason Jonathan's engine is logging out, and it looks like the
>>counterparty is not acknowledging the logout message and resetting
>>sequence numbers. From the socket error logged after the
>>"Disconnecting" message, they're just dropping the connection. I think
>>
>>
>
>
>
>>that's wrong, but the more pressing question is Jonathan's: why's
>>QuickFIX disconnecting and resetting in the first place?
>>
>>
>>
>>
>-----------------------------------------------------------------------
-
>
>
>>*From:* Caleb Epstein [mailto:cal...@gm...]
>>*Sent:* Monday, February 27, 2006 11:49 PM
>>*To:* Steinberg, Jonathan
>>*Cc:* John Hensley; qui...@li...
>>*Subject:* Re: [Quickfix-developers] Session Resetting
>>
>>On 2/27/06, *Steinberg, Jonathan*
>><Jon...@bo...
>><mailto:Jon...@bo...>> wrote:
>>
>> There was also a sequence reset at 5:00, but nothing since that
>> point - here is the complete event log with the sequence reset put
>> back .
>>
>> Where else would I look?
>>
>> What events would cause a logout/session reset?
>>
>>
>>Hitting the Session's configured StartTime. From an earlier mail, you
>>have:
>>
>>[DEFAULT]
>>
>>HeartBtInt=60
>>
>>StartTime=10:00:00
>>
>>EndTime=01:00:00
>>
>>
>>Which would agree with an 05:00 local time reset of sequence numbers
>>(StartTime is in GMT).
>>
>>--
>>Caleb Epstein
>>caleb dot epstein at gmail dot com
>>
>>
>>
>
>
>
>
|