API Support Forum
OEC API > Market Data > ZSK21 Stops Receiving Intraday History after First OnBarsReceived Callback
Author Topic: ZSK21 Stops Receiving Intraday History after First OnBarsReceived Callback
(43 messages, Page 2 of 3)
Moderators: VPfau
RWare2020
Posts: 206
Joined: Feb 11, 2020


Posted: Apr 28, 2021 @ 12:51 PM             Msg. 2 of 43
That seems a little strange since all I am subscribing to is soybeans and it is not extremely active. This also happens when the soybeans market is closed when it shouldn't be requesting any price updates.

I see all of the time in the call stack that it seems like something is being locked.

combase!CCliModalLoop::BlockFn+14b [onecore\com\combase\dcomrem\callctrl.cxx @ 2156 + d] onecore\com\combase\dcomrem\callctrl.cxx @ 2156 + d
combase!ClassicSTAThreadWaitForHandles+b4 [onecore\com\combase\dcomrem\classicsta.cpp @ 51 + e] onecore\com\combase\dcomrem\classicsta.cpp @ 51 + e
combase!CoWaitForMultipleHandles+77 [onecore\com\combase\dcomrem\sync.cxx @ 122 + c] onecore\com\combase\dcomrem\sync.cxx @ 122 + c
JSmith5611
Posts: 187
Joined:


Posted: Apr 28, 2021 @ 01:37 PM             Msg. 4 of 43
The command you send was requesting the entire history of ZSK21 in minute bars.. all ~147,000 of them. Market being opened or closed won't affect how much history there is.
Jason Smith
RWare2020
Posts: 206
Joined: Feb 11, 2020


Posted: Apr 28, 2021 @ 01:59 PM             Msg. 6 of 43
Right. Sorry, I didn't realize history requests were the same as price updates.

Why would this just be having an issue now? Do you have any suggestions on how to fix it?

Thanks
RWare2020
Posts: 206
Joined: Feb 11, 2020


Posted: Apr 28, 2021 @ 05:34 PM             Msg. 8 of 43
Additionally, what is the explanation for it working in a real account and not demo? There is never an issue in a real account and we do the same exact process as we do in a demo account that we do in a real with the same amount of data.

We have been doing this same process for 13 years without an issue.

Something doesn't quite add up there.
JSmith5611
Posts: 187
Joined:


Posted: Apr 30, 2021 @ 07:38 AM             Msg. 10 of 43
I've been search for settings differences between demo and production, or anything else that would cause the behavior differences, but nothing so far.

A simple work around would not requesting the entire history at once, loading a date range at a time.
Jason Smith
RWare2020
Posts: 206
Joined: Feb 11, 2020


Posted: May 02, 2021 @ 10:40 PM             Msg. 12 of 43
Sure, we can load a date range at a time, but we don't know when to have a start date time unless we request back to basically 0 unix time and don't know when to have an end date so we have to request beginning of time to today. Otherwise we are just shooting in the dark.

Requesting the bars in reverse order (starting with todays date and working backwards) is going to take a pretty major rework on our part so that is not really a great solution to that.

How would you request all of the intraday history for a minute interval when we don't know a start date? We cache the data, so we change the start date to the last cached data if we have cached data but if this is the first time pulling the data, I can't think of a way to request a date range if we don't know when a contract started.

I tried playing around with requesting a certain number of contracts like there is with the contract load request and then just continually request 4096 contracts, but there is no way for me to skip a number of contracts. So I have to request some sort of max contracts which doesn't help my situation either because 1. I want all of the history which I am attempting with my timestamp request which is causing this memory issue, and 2. We don't know how many bars to request in total.

Any advancements on finding the issue?

Thanks.
Edited by RWare2020 on May 02, 2021 10:43 PM
Edited by RWare2020 on May 03, 2021 03:07 PM
RWare2020
Posts: 206
Joined: Feb 11, 2020


Posted: May 03, 2021 @ 04:43 PM             Msg. 14 of 43
There is another issue with soybeans that I am seeing. I am trying to load 60 minute history and it is never sending me back more than 1 bar. I end up getting an insane amount of log messages back. Here is a chunk of them. Again, user is TNT2.

Timestamp: 5/3/2021 3:40:27 PM - Category: 2 - Message: PriceConnection Outgoing: SubscribeMsg Subscribe=Load Type=Bar StartDate=12/29/1899 11:55:00 PM EndDate=1/17/2020 1:00:00 AM Interval=60 SubscriptionID=525 ContractID=276049534
Timestamp: 5/3/2021 3:40:27 PM - Category: 0 - Message: 525 ZSK21: 1 Bars BarsMsg SubscriptionID=525 Bars=[Item OpenTimestamp=1/17/2020 1:00:00 AM Open=9.49250030517578 High=9.5 Low=9.49250030517578 Close=9.5 Volume=2 Ticks=2 CloseTimestamp=1/17/2020 2:00:00 AM OpenTimestampTicks=0 CloseTimestampTicks=0 UpTicks=2 DownTicks=0 UpVolume=2 DownVolume=0 OpenInterest=0]
Timestamp: 5/3/2021 3:40:27 PM - Category: 0 - Message: 525 ZSK21: 0 Bars Timestamp: 5/3/2021 3:40:27 PM - Category: 2 - Message: PriceConnection Outgoing: SubscribeMsg Subscribe=Load Type=Bar StartDate=12/29/1899 11:55:00 PM EndDate=1/17/2020 1:00:00 AM Interval=60 SubscriptionID=526 ContractID=276049534
Timestamp: 5/3/2021 3:40:28 PM - Category: 0 - Message: 526 ZSK21: 1 Bars BarsMsg SubscriptionID=526 Bars=[Timestamp: 5/3/2021 3:40:28 PM - Category: 0 - Message: 526 ZSK21: 0 Bars BarsMsg SubscriptionID=526
Timestamp: 5/3/2021 3:40:28 PM - Category: 2 - Message: PriceConnection Outgoing: SubscribeMsg Subscribe=Load Type=Bar StartDate=12/29/1899 11:55:00 PM EndDate=1/17/2020 1:00:00 AM Interval=60 SubscriptionID=527 ContractID=276049534
Timestamp: 5/3/2021 3:40:28 PM - Category: 0 - Message: 527 ZSK21: 1 Bars BarsMsg SubscriptionID=527 Bars=[Timestamp: 5/3/2021 3:40:28 PM - Category: 0 - Message: 527 ZSK21: 0 Bars BarsMsg SubscriptionID=527
Timestamp: 5/3/2021 3:40:28 PM - Category: 2 - Message: PriceConnection Outgoing: SubscribeMsg Subscribe=Load Type=Bar StartDate=12/29/1899 11:55:00 PM EndDate=1/17/2020 1:00:00 AM Interval=60 SubscriptionID=528 ContractID=276049534
Timestamp: 5/3/2021 3:40:28 PM - Category: 0 - Message: 528 ZSK21: 1 Bars BarsMsg SubscriptionID=528 Bars=[Timestamp: 5/3/2021 3:40:28 PM - Category: 0 - Message: 528 ZSK21: 0 Bars BarsMsg SubscriptionID=528
Timestamp: 5/3/2021 3:40:28 PM - Category: 2 - Message: PriceConnection Outgoing: SubscribeMsg Subscribe=Load Type=Bar StartDate=12/29/1899 11:55:00 PM EndDate=1/17/2020 1:00:00 AM Interval=60 SubscriptionID=529 ContractID=276049534
Timestamp: 5/3/2021 3:40:28 PM - Category: 0 - Message: 529 ZSK21: 1 Bars BarsMsg SubscriptionID=529 Bars=[Timestamp: 5/3/2021 3:40:28 PM - Category: 0 - Message: 529 ZSK21: 0 Bars BarsMsg SubscriptionID=529
Timestamp: 5/3/2021 3:40:28 PM - Category: 2 - Message: PriceConnection Outgoing: SubscribeMsg Subscribe=Load Type=Bar StartDate=12/29/1899 11:55:00 PM EndDate=1/17/2020 1:00:00 AM Interval=60 SubscriptionID=530 ContractID=276049534
Timestamp: 5/3/2021 3:40:28 PM - Category: 0 - Message: 530 ZSK21: 1 Bars BarsMsg SubscriptionID=530 Bars=[Timestamp: 5/3/2021 3:40:28 PM - Category: 0 - Message: 530 ZSK21: 0 Bars BarsMsg SubscriptionID=530
Timestamp: 5/3/2021 3:40:28 PM - Category: 2 - Message: PriceConnection Outgoing: SubscribeMsg Subscribe=Load Type=Bar StartDate=12/29/1899 11:55:00 PM EndDate=1/17/2020 1:00:00 AM Interval=60 SubscriptionID=531 ContractID=276049534
Timestamp: 5/3/2021 3:40:28 PM - Category: 0 - Message: 531 ZSK21: 1 Bars BarsMsg SubscriptionID=531 Bars=[Timestamp: 5/3/2021 3:40:28 PM - Category: 0 - Message: 531 ZSK21: 0 Bars BarsMsg SubscriptionID=531
Timestamp: 5/3/2021 3:40:28 PM - Category: 2 - Message: PriceConnection Outgoing: SubscribeMsg Subscribe=Load Type=Bar StartDate=12/29/1899 11:55:00 PM EndDate=1/17/2020 1:00:00 AM Interval=60 SubscriptionID=532 ContractID=276049534
Timestamp: 5/3/2021 3:40:28 PM - Category: 0 - Message: 532 ZSK21: 1 Bars BarsMsg SubscriptionID=532 Bars=[Timestamp: 5/3/2021 3:40:28 PM - Category: 0 - Message: 532 ZSK21: 0 Bars BarsMsg SubscriptionID=532
Timestamp: 5/3/2021 3:40:28 PM - Category: 2 - Message: PriceConnection Outgoing: SubscribeMsg Subscribe=Load Type=Bar StartDate=12/29/1899 11:55:00 PM EndDate=1/17/2020 1:00:00 AM Interval=60 SubscriptionID=533 ContractID=276049534
Timestamp: 5/3/2021 3:40:28 PM - Category: 0 - Message: 533 ZSK21: 1 Bars BarsMsg SubscriptionID=533 Bars=[Timestamp: 5/3/2021 3:40:28 PM - Category: 0 - Message: 533 ZSK21: 0 Bars BarsMsg SubscriptionID=533
Timestamp: 5/3/2021 3:40:28 PM - Category: 2 - Message: PriceConnection Outgoing: SubscribeMsg Subscribe=Load Type=Bar StartDate=12/29/1899 11:55:00 PM EndDate=1/17/2020 1:00:00 AM Interval=60 SubscriptionID=534 ContractID=276049534
Timestamp: 5/3/2021 3:40:28 PM - Category: 0 - Message: 534 ZSK21: 1 Bars BarsMsg SubscriptionID=534 Bars=[Timestamp: 5/3/2021 3:40:28 PM - Category: 0 - Message: 534 ZSK21: 0 Bars BarsMsg SubscriptionID=534
Timestamp: 5/3/2021 3:40:28 PM - Category: 2 - Message: PriceConnection Outgoing: SubscribeMsg Subscribe=Load Type=Bar StartDate=12/29/1899 11:55:00 PM EndDate=1/17/2020 1:00:00 AM Interval=60 SubscriptionID=535 ContractID=276049534
Timestamp: 5/3/2021 3:40:28 PM - Category: 0 - Message: 535 ZSK21: 1 Bars BarsMsg SubscriptionID=535 Bars=[Timestamp: 5/3/2021 3:40:28 PM - Category: 0 - Message: 535 ZSK21: 0 Bars BarsMsg SubscriptionID=535
Timestamp: 5/3/2021 3:40:28 PM - Category: 2 - Message: PriceConnection Outgoing: SubscribeMsg Subscribe=Load Type=Bar StartDate=12/29/1899 11:55:00 PM EndDate=1/17/2020 1:00:00 AM Interval=60 SubscriptionID=536 ContractID=276049534
Timestamp: 5/3/2021 3:40:29 PM - Category: 0 - Message: 536 ZSK21: 1 BarsBarsMsg SubscriptionID=536 Bars=[Timestamp: 5/3/2021 3:40:29 PM - Category: 0 - Message: 536 ZSK21: 0 Bars BarsMsg SubscriptionID=536
Timestamp: 5/3/2021 3:40:29 PM - Category: 2 - Message: PriceConnection Outgoing: SubscribeMsg Subscribe=Load Type=Bar StartDate=12/29/1899 11:55:00 PM EndDate=1/17/2020 1:00:00 AM Interval=60 SubscriptionID=537 ContractID=276049534
Timestamp: 5/3/2021 3:40:29 PM - Category: 0 - Message: 537 ZSK21: 1 Bars BarsMsg SubscriptionID=537 Bars=[Timestamp: 5/3/2021 3:40:29 PM - Category: 0 - Message: 537 ZSK21: 0 Bars BarsMsg SubscriptionID=537
Timestamp: 5/3/2021 3:40:29 PM - Category: 2 - Message: PriceConnection Outgoing: SubscribeMsg Subscribe=Load Type=Bar StartDate=12/29/1899 11:55:00 PM EndDate=1/17/2020 1:00:00 AM Interval=60 SubscriptionID=538 ContractID=276049534
Timestamp: 5/3/2021 3:40:29 PM - Category: 0 - Message: 538 ZSK21: 1 Bars BarsMsg SubscriptionID=538 Bars=[Timestamp: 5/3/2021 3:40:29 PM - Category: 0 - Message: 538 ZSK21: 0 Bars BarsMsg SubscriptionID=538
Timestamp: 5/3/2021 3:40:29 PM - Category: 2 - Message: PriceConnection Outgoing: SubscribeMsg Subscribe=Load Type=Bar StartDate=12/29/1899 11:55:00 PM EndDate=1/17/2020 1:00:00 AM Interval=60 SubscriptionID=539 ContractID=276049534
Timestamp: 5/3/2021 3:40:29 PM - Category: 0 - Message: 539 ZSK21: 1 Bars BarsMsg SubscriptionID=539 Bars=[Timestamp: 5/3/2021 3:40:29 PM - Category: 0 - Message: 539 ZSK21: 0 Bars BarsMsg SubscriptionID=539
Timestamp: 5/3/2021 3:40:29 PM - Category: 2 - Message: PriceConnection Outgoing: SubscribeMsg Subscribe=Load Type=Bar StartDate=12/29/1899 11:55:00 PM EndDate=1/17/2020 1:00:00 AM Interval=60 SubscriptionID=540 ContractID=276049534
Timestamp: 5/3/2021 3:40:29 PM - Category: 0 - Message: 540 ZSK21: 1 Bars BarsMsg SubscriptionID=540 Bars=[Timestamp: 5/3/2021 3:41:10 PM - Category: 0 - Message: 540 ZSK21: 0 Bars BarsMsg SubscriptionID=540
Edited by RWare2020 on May 03, 2021 05:03 PM
RWare2020
Posts: 206
Joined: Feb 11, 2020


Posted: May 03, 2021 @ 07:30 PM             Msg. 16 of 43
Another thing I have observed is that there are times it works to get all of the data. When it does work and I clear my cache during that same instance and request the minute data again, it never fails. It always succeeds to get all of the data. Here is the logging for two of the 5 times I requested in the same instance. All 5 times, it successfully requested all of the minute data. I am doing the exact same process each time whether it fails or succeeds.

Timestamp: 5/3/2021 6:24:21 PM - Category: 2 - Message: PriceConnection Outgoing: SubscribeMsg Subscribe=Load Type=Bar StartDate=12/31/1899 11:55:00 PM EndDate=5/4/2021 12:34:00 AM Interval=1 SubscriptionID=37 ContractID=276049534
Timestamp: 5/3/2021 6:24:23 PM - Category: 0 - Message: 37 ZSK21: 4096 Bars BarsMsg SubscriptionID=37 Bars=[4096]
Timestamp: 5/3/2021 6:24:23 PM - Category: 0 - Message: 37 ZSK21: 4096 Bars BarsMsg SubscriptionID=37 Bars=[4096]
Timestamp: 5/3/2021 6:24:23 PM - Category: 0 - Message: 37 ZSK21: 4096 Bars BarsMsg SubscriptionID=37 Bars=[4096]
Timestamp: 5/3/2021 6:24:23 PM - Category: 0 - Message: 37 ZSK21: 4096 Bars BarsMsg SubscriptionID=37 Bars=[4096]
Timestamp: 5/3/2021 6:24:23 PM - Category: 0 - Message: 37 ZSK21: 4096 Bars BarsMsg SubscriptionID=37 Bars=[4096]
Timestamp: 5/3/2021 6:24:23 PM - Category: 0 - Message: 37 ZSK21: 4096 Bars BarsMsg SubscriptionID=37 Bars=[4096]
Timestamp: 5/3/2021 6:24:23 PM - Category: 0 - Message: 37 ZSK21: 4096 Bars BarsMsg SubscriptionID=37 Bars=[4096]
Timestamp: 5/3/2021 6:24:23 PM - Category: 0 - Message: 37 ZSK21: 4096 Bars BarsMsg SubscriptionID=37 Bars=[4096]
Timestamp: 5/3/2021 6:24:23 PM - Category: 0 - Message: 37 ZSK21: 4096 Bars BarsMsg SubscriptionID=37 Bars=[4096]
Timestamp: 5/3/2021 6:24:23 PM - Category: 0 - Message: 37 ZSK21: 4096 Bars BarsMsg SubscriptionID=37 Bars=[4096]
Timestamp: 5/3/2021 6:24:23 PM - Category: 0 - Message: 37 ZSK21: 4096 Bars BarsMsg SubscriptionID=37 Bars=[4096]
Timestamp: 5/3/2021 6:24:24 PM - Category: 0 - Message: 37 ZSK21: 4096 Bars BarsMsg SubscriptionID=37 Bars=[4096]
Timestamp: 5/3/2021 6:24:24 PM - Category: 0 - Message: 37 ZSK21: 4096 Bars BarsMsg SubscriptionID=37 Bars=[4096]
Timestamp: 5/3/2021 6:24:24 PM - Category: 0 - Message: 37 ZSK21: 4096 Bars BarsMsg SubscriptionID=37 Bars=[4096]
Timestamp: 5/3/2021 6:24:24 PM - Category: 0 - Message: 37 ZSK21: 4096 Bars BarsMsg SubscriptionID=37 Bars=[4096]
Timestamp: 5/3/2021 6:24:24 PM - Category: 0 - Message: 37 ZSK21: 4096 Bars BarsMsg SubscriptionID=37 Bars=[4096]
Timestamp: 5/3/2021 6:24:24 PM - Category: 0 - Message: 37 ZSK21: 4096 Bars BarsMsg SubscriptionID=37 Bars=[4096]
Timestamp: 5/3/2021 6:24:24 PM - Category: 0 - Message: 37 ZSK21: 4096 Bars BarsMsg SubscriptionID=37 Bars=[4096]
Timestamp: 5/3/2021 6:24:24 PM - Category: 0 - Message: 37 ZSK21: 4096 Bars BarsMsg SubscriptionID=37 Bars=[4096]
Timestamp: 5/3/2021 6:24:24 PM - Category: 0 - Message: 37 ZSK21: 4096 Bars BarsMsg SubscriptionID=37 Bars=[4096]
Timestamp: 5/3/2021 6:24:24 PM - Category: 0 - Message: 37 ZSK21: 4096 Bars BarsMsg SubscriptionID=37 Bars=[4096]
Timestamp: 5/3/2021 6:24:24 PM - Category: 0 - Message: 37 ZSK21: 4096 Bars BarsMsg SubscriptionID=37 Bars=[4096]
Timestamp: 5/3/2021 6:24:24 PM - Category: 0 - Message: 37 ZSK21: 4096 Bars BarsMsg SubscriptionID=37 Bars=[4096]
Timestamp: 5/3/2021 6:24:24 PM - Category: 0 - Message: 37 ZSK21: 4096 Bars BarsMsg SubscriptionID=37 Bars=[4096]
Timestamp: 5/3/2021 6:24:24 PM - Category: 0 - Message: 37 ZSK21: 4096 Bars BarsMsg SubscriptionID=37 Bars=[4096]
Timestamp: 5/3/2021 6:24:24 PM - Category: 0 - Message: 37 ZSK21: 4096 Bars BarsMsg SubscriptionID=37 Bars=[4096]
Timestamp: 5/3/2021 6:24:24 PM - Category: 0 - Message: 37 ZSK21: 4096 Bars BarsMsg SubscriptionID=37 Bars=[4096]
Timestamp: 5/3/2021 6:24:24 PM - Category: 0 - Message: 37 ZSK21: 4096 Bars BarsMsg SubscriptionID=37 Bars=[4096]
Timestamp: 5/3/2021 6:24:24 PM - Category: 0 - Message: 37 ZSK21: 4096 Bars BarsMsg SubscriptionID=37 Bars=[4096]
Timestamp: 5/3/2021 6:24:24 PM - Category: 0 - Message: 37 ZSK21: 4096 Bars BarsMsg SubscriptionID=37 Bars=[4096]
Timestamp: 5/3/2021 6:24:24 PM - Category: 0 - Message: 37 ZSK21: 4096 Bars BarsMsg SubscriptionID=37 Bars=[4096]
Timestamp: 5/3/2021 6:24:24 PM - Category: 0 - Message: 37 ZSK21: 4096 Bars BarsMsg SubscriptionID=37 Bars=[4096]
Timestamp: 5/3/2021 6:24:24 PM - Category: 0 - Message: 37 ZSK21: 4096 Bars BarsMsg SubscriptionID=37 Bars=[4096]
Timestamp: 5/3/2021 6:24:24 PM - Category: 0 - Message: 37 ZSK21: 4096 Bars BarsMsg SubscriptionID=37 Bars=[4096]
Timestamp: 5/3/2021 6:24:24 PM - Category: 0 - Message: 37 ZSK21: 4096 Bars BarsMsg SubscriptionID=37 Bars=[4096]
Timestamp: 5/3/2021 6:24:24 PM - Category: 0 - Message: 37 ZSK21: 4096 Bars BarsMsg SubscriptionID=37 Bars=[4096]
Timestamp: 5/3/2021 6:24:24 PM - Category: 0 - Message: 37 ZSK21: 4096 Bars BarsMsg SubscriptionID=37 Bars=[4096]
Timestamp: 5/3/2021 6:24:24 PM - Category: 0 - Message: 37 ZSK21: 4096 Bars BarsMsg SubscriptionID=37 Bars=[4096]
Timestamp: 5/3/2021 6:24:24 PM - Category: 0 - Message: 37 ZSK21: 2329 Bars BarsMsg SubscriptionID=37 Bars=[2329]
Timestamp: 5/3/2021 6:24:24 PM - Category: 0 - Message: 37 ZSK21: 0 Bars BarsMsg SubscriptionID=37
Timestamp: 5/3/2021 6:24:28 PM - Category: 2 - Message: PriceConnection Outgoing: UnsubscribeMsg SubscriptionID=35 ContractID=276049534
Timestamp: 5/3/2021 6:24:28 PM - Category: 2 - Message: PriceConnection Outgoing: UnsubscribeMsg Type=Bar SubscriptionID=34 ContractID=276049534
Timestamp: 5/3/2021 6:24:37 PM - Category: 2 - Message: PriceConnection Outgoing: SubscribeMsg Type=Bar StartDate=5/4/2021 12:24:42 AM EndDate=12/31/9999 11:59:59 PM Interval=1 SubscriptionID=38 ContractID=276049534
Timestamp: 5/3/2021 6:24:37 PM - Category: 4 - Message: Subscribe to price for contract: ZSK21
Timestamp: 5/3/2021 6:24:37 PM - Category: 2 - Message: PriceConnection Outgoing: SubscribeMsg StartDate=12/31/9999 11:59:59 PM EndDate=12/31/9999 11:59:59 PM SubscriptionID=39 ContractID=276049534
Timestamp: 5/3/2021 6:24:37 PM - Category: 2 - Message: PriceConnection Outgoing: SubscribeMsg Subscribe=Load Type=DayBar StartDate=12/31/1899 11:50:00 PM EndDate=5/4/2021 12:34:00 AM Interval=1 SubscriptionID=40 ContractID=276049534
Timestamp: 5/3/2021 6:24:38 PM - Category: 0 - Message: 40 ZSK21: 426 Bars BarsMsg SubscriptionID=40 Bars=[426]
Timestamp: 5/3/2021 6:24:38 PM - Category: 0 - Message: 40 ZSK21: 0 Bars BarsMsg SubscriptionID=40
Timestamp: 5/3/2021 6:24:43 PM - Category: 2 - Message: PriceConnection Outgoing: SubscribeMsg Subscribe=Load Type=Bar StartDate=12/31/1899 11:55:00 PM EndDate=5/4/2021 12:34:00 AM Interval=1 SubscriptionID=41 ContractID=276049534
Timestamp: 5/3/2021 6:24:45 PM - Category: 0 - Message: 41 ZSK21: 4096 Bars BarsMsg SubscriptionID=41 Bars=[4096]
Timestamp: 5/3/2021 6:24:45 PM - Category: 0 - Message: 41 ZSK21: 4096 Bars BarsMsg SubscriptionID=41 Bars=[4096]
Timestamp: 5/3/2021 6:24:45 PM - Category: 0 - Message: 41 ZSK21: 4096 Bars BarsMsg SubscriptionID=41 Bars=[4096]
Timestamp: 5/3/2021 6:24:45 PM - Category: 0 - Message: 41 ZSK21: 4096 Bars BarsMsg SubscriptionID=41 Bars=[4096]
Timestamp: 5/3/2021 6:24:45 PM - Category: 0 - Message: 41 ZSK21: 4096 Bars BarsMsg SubscriptionID=41 Bars=[4096]
Timestamp: 5/3/2021 6:24:45 PM - Category: 0 - Message: 41 ZSK21: 4096 Bars BarsMsg SubscriptionID=41 Bars=[4096]
Timestamp: 5/3/2021 6:24:45 PM - Category: 0 - Message: 41 ZSK21: 4096 Bars BarsMsg SubscriptionID=41 Bars=[4096]
Timestamp: 5/3/2021 6:24:45 PM - Category: 0 - Message: 41 ZSK21: 4096 Bars BarsMsg SubscriptionID=41 Bars=[4096]
Timestamp: 5/3/2021 6:24:45 PM - Category: 0 - Message: 41 ZSK21: 4096 Bars BarsMsg SubscriptionID=41 Bars=[4096]
Timestamp: 5/3/2021 6:24:45 PM - Category: 0 - Message: 41 ZSK21: 4096 Bars BarsMsg SubscriptionID=41 Bars=[4096]
Timestamp: 5/3/2021 6:24:45 PM - Category: 0 - Message: 41 ZSK21: 4096 Bars BarsMsg SubscriptionID=41 Bars=[4096]
Timestamp: 5/3/2021 6:24:45 PM - Category: 0 - Message: 41 ZSK21: 4096 Bars BarsMsg SubscriptionID=41 Bars=[4096]
Timestamp: 5/3/2021 6:24:45 PM - Category: 0 - Message: 41 ZSK21: 4096 Bars BarsMsg SubscriptionID=41 Bars=[4096]
Timestamp: 5/3/2021 6:24:46 PM - Category: 0 - Message: 41 ZSK21: 4096 Bars BarsMsg SubscriptionID=41 Bars=[4096]
Timestamp: 5/3/2021 6:24:46 PM - Category: 0 - Message: 41 ZSK21: 4096 Bars BarsMsg SubscriptionID=41 Bars=[4096]
Timestamp: 5/3/2021 6:24:46 PM - Category: 0 - Message: 41 ZSK21: 4096 Bars BarsMsg SubscriptionID=41 Bars=[4096]
Timestamp: 5/3/2021 6:24:46 PM - Category: 0 - Message: 41 ZSK21: 4096 Bars BarsMsg SubscriptionID=41 Bars=[4096]
Timestamp: 5/3/2021 6:24:46 PM - Category: 0 - Message: 41 ZSK21: 4096 Bars BarsMsg SubscriptionID=41 Bars=[4096]
Timestamp: 5/3/2021 6:24:46 PM - Category: 0 - Message: 41 ZSK21: 4096 Bars BarsMsg SubscriptionID=41 Bars=[4096]
Timestamp: 5/3/2021 6:24:46 PM - Category: 0 - Message: 41 ZSK21: 4096 Bars BarsMsg SubscriptionID=41 Bars=[4096]
Timestamp: 5/3/2021 6:24:46 PM - Category: 0 - Message: 41 ZSK21: 4096 Bars BarsMsg SubscriptionID=41 Bars=[4096]
Timestamp: 5/3/2021 6:24:46 PM - Category: 0 - Message: 41 ZSK21: 4096 Bars BarsMsg SubscriptionID=41 Bars=[4096]
Timestamp: 5/3/2021 6:24:46 PM - Category: 0 - Message: 41 ZSK21: 4096 Bars BarsMsg SubscriptionID=41 Bars=[4096]
Timestamp: 5/3/2021 6:24:46 PM - Category: 0 - Message: 41 ZSK21: 4096 Bars BarsMsg SubscriptionID=41 Bars=[4096]
Timestamp: 5/3/2021 6:24:46 PM - Category: 0 - Message: 41 ZSK21: 4096 Bars BarsMsg SubscriptionID=41 Bars=[4096]
Timestamp: 5/3/2021 6:24:46 PM - Category: 0 - Message: 41 ZSK21: 4096 Bars BarsMsg SubscriptionID=41 Bars=[4096]
Timestamp: 5/3/2021 6:24:46 PM - Category: 0 - Message: 41 ZSK21: 4096 Bars BarsMsg SubscriptionID=41 Bars=[4096]
Timestamp: 5/3/2021 6:24:46 PM - Category: 0 - Message: 41 ZSK21: 4096 Bars BarsMsg SubscriptionID=41 Bars=[4096]
Timestamp: 5/3/2021 6:24:46 PM - Category: 0 - Message: 41 ZSK21: 4096 Bars BarsMsg SubscriptionID=41 Bars=[4096]
Timestamp: 5/3/2021 6:24:46 PM - Category: 0 - Message: 41 ZSK21: 4096 Bars BarsMsg SubscriptionID=41 Bars=[4096]
Timestamp: 5/3/2021 6:24:46 PM - Category: 0 - Message: 41 ZSK21: 4096 Bars BarsMsg SubscriptionID=41 Bars=[4096]
Timestamp: 5/3/2021 6:24:46 PM - Category: 0 - Message: 41 ZSK21: 4096 Bars BarsMsg SubscriptionID=41 Bars=[4096]
Timestamp: 5/3/2021 6:24:46 PM - Category: 0 - Message: 41 ZSK21: 4096 Bars BarsMsg SubscriptionID=41 Bars=[4096]
Timestamp: 5/3/2021 6:24:46 PM - Category: 0 - Message: 41 ZSK21: 4096 Bars BarsMsg SubscriptionID=41 Bars=[4096]
Timestamp: 5/3/2021 6:24:46 PM - Category: 0 - Message: 41 ZSK21: 4096 Bars BarsMsg SubscriptionID=41 Bars=[4096]
Timestamp: 5/3/2021 6:24:46 PM - Category: 0 - Message: 41 ZSK21: 4096 Bars BarsMsg SubscriptionID=41 Bars=[4096]
Timestamp: 5/3/2021 6:24:46 PM - Category: 0 - Message: 41 ZSK21: 4096 Bars BarsMsg SubscriptionID=41 Bars=[4096]
Timestamp: 5/3/2021 6:24:46 PM - Category: 0 - Message: 41 ZSK21: 4096 Bars BarsMsg SubscriptionID=41 Bars=[4096]
Timestamp: 5/3/2021 6:24:46 PM - Category: 0 - Message: 41 ZSK21: 2329 Bars BarsMsg SubscriptionID=41 Bars=[2329]
Timestamp: 5/3/2021 6:24:46 PM - Category: 0 - Message: 41 ZSK21: 0 Bars BarsMsg SubscriptionID=41


Could it be that I'm being directed to a different server and that server is having an issue? I am trying to find a way to determine an ip address or something I connect to. I will post back if I figure something out.
RWare2020
Posts: 206
Joined: Feb 11, 2020


Posted: May 03, 2021 @ 07:56 PM             Msg. 18 of 43
I didn't realize that it displayed which server it connects to when logging in. I can confirm that I am having the same issue for both IP addresses.

Will you check why I got disconnected at this time MST for user TNT2:
Timestamp: 5/3/2021 6:42:33 PM - Category: 0 - Message: PriceConnection Disconnected: System.IO.IOException: Disconnected
The log shows this little call stack:
at GF.Net.PacketSocket.ReadLen(Byte[] buf, Int32 length)
at GF.Net.PacketSocket.Read()
at GF.Net.ProtoSocket.Read[T](Func`2 deserialize)
at GF.Net.ProtoClient`2.ReadLoop()

---------------

Here is another SocketException stack I had MST - Timestamp: 5/3/2021 6:46:56 PM - Category: 0 - Message: PriceConnection Disconnected: System.Net.Sockets.SocketException (0x80004005): An existing connection was forcibly closed by the remote host
:

System.Net.Sockets.SocketException - Message: An existing connection was forcibly closed by the remote host
Stack Trace:
System.Net.Sockets.Socket.Receive(Byte[], Int32, Int32, System.Net.Sockets.SocketFlags)
GF.Net.GFSocket.Receive(Byte[], Int32, Int32, System.Net.Sockets.SocketFlags)
GF.Net.PacketSocket.ReadLen(Byte[], Int32)
GF.Net.PacketSocket.Read()
GF.Net.ProtoSocket.Read[[System.__Canon, mscorlib]](System.Func`2)
GF.Net.ProtoClient`2[[System.__Canon, mscorlib],[System.__Canon, mscorlib]].ReadLoop()

System.Exception - Message: by request
Stack Trace:
System.Net.Sockets.Socket.Receive(Byte[], Int32, Int32, System.Net.Sockets.SocketFlags)
GF.Net.GFSocket.Receive(Byte[], Int32, Int32, System.Net.Sockets.SocketFlags)
GF.Net.PacketSocket.ReadLen(Byte[], Int32)
GF.Net.PacketSocket.Read()
GF.Net.ProtoSocket.Read[[System.__Canon, mscorlib]](System.Func`2)
GF.Net.ProtoClient`2[[System.__Canon, mscorlib],[System.__Canon, mscorlib]].ReadLoop()

System.Net.Sockets.SocketException - Message: A blocking operation was interrupted by a call to WSACancelBlockingCall
Stack Trace:
System.Net.Sockets.Socket.Receive(Byte[], Int32, Int32, System.Net.Sockets.SocketFlags)
GF.Net.GFSocket.Receive(Byte[], Int32, Int32, System.Net.Sockets.SocketFlags)
GF.Net.PacketSocket.ReadLen(Byte[], Int32)
GF.Net.PacketSocket.Read()
GF.Net.ProtoSocket.Read[[System.__Canon, mscorlib]](System.Func`2)
GF.Net.ProtoClient`2[[System.__Canon, mscorlib],[System.__Canon, mscorlib]].ReadLoop()

-------------

Sorry for the spam, I just want to try and get you as much information as possible.
JSmith5611
Posts: 187
Joined:


Posted: May 04, 2021 @ 10:49 AM             Msg. 20 of 43
Sorry, having issues getting notifications when forum threads update.. checking on your questions..
Jason Smith
JSmith5611
Posts: 187
Joined:


Posted: May 04, 2021 @ 11:00 AM             Msg. 22 of 43
I don't know how far back ZSK21 history goes, but you're only asking for history up to mid january 2020:

Timestamp: 5/3/2021 3:40:29 PM - Category: 2 - Message: PriceConnection Outgoing: SubscribeMsg Subscribe=Load Type=Bar StartDate=12/29/1899 11:55:00 PM EndDate=1/17/2020 1:00:00 AM Interval=60 SubscriptionID=540 ContractID=276049534
Jason Smith
JSmith5611
Posts: 187
Joined:


Posted: May 04, 2021 @ 11:09 AM             Msg. 24 of 43
Connection was dropped due to previously mentioned issue.

19:42:33.214 - Logged off 50.77.44.92:64631:TNT2 Slow connection

19:46:56.625 - Logged off 50.77.44.92:65202:TNT2 Slow connection
Jason Smith
RWare2020
Posts: 206
Joined: Feb 11, 2020


Posted: May 04, 2021 @ 12:03 PM             Msg. 26 of 43
Re:
"I don't know how far back ZSK21 history goes, but you're only asking for history up to mid january 2020:

Timestamp: 5/3/2021 3:40:29 PM - Category: 2 - Message: PriceConnection Outgoing: SubscribeMsg Subscribe=Load Type=Bar StartDate=12/29/1899 11:55:00 PM EndDate=1/17/2020 1:00:00 AM Interval=60 SubscriptionID=540 ContractID=276049534"

You're right, sorry I didn't catch that. When it does pull in, the first bar starts 01/21/2020.

I'm still at a loss for what to do. We have had 7 reporters of this issue all demo accounts and it is fixed by logging into prod.gainfutures.com, caching the data, and then logging into a demo account.
JSmith5611
Posts: 187
Joined:


Posted: May 05, 2021 @ 01:39 PM             Msg. 28 of 43
You don't use the same contractIDs between sim and prod, right?
Jason Smith
RWare2020
Posts: 206
Joined: Feb 11, 2020


Posted: May 05, 2021 @ 01:52 PM             Msg. 30 of 43
I believe we do use the same contractID's between sim and prod.

This is how I get the contract for both sim and prod:
IContractPtr con = GFApi()->Contracts->Get_2((LPCTSTR)sym);

Both sim and prod we do the same contract load request as well.

I can do some more research to be certain of this.
RWare2020
Posts: 206
Joined: Feb 11, 2020


Posted: May 05, 2021 @ 02:11 PM             Msg. 32 of 43
Never mind, sorry I just tested and the id's are different between sim and prod.
RWare2020
Posts: 206
Joined: Feb 11, 2020


Posted: May 05, 2021 @ 03:14 PM             Msg. 34 of 43
Here is some more stuff I have been testing today...

I was thinking about when you said that the issue is that we aren't processing the callback fast enough so I played with some things to see if I can get something to process faster

Completely commenting out the OnBarsReceived callback so that it doesn't handle it at all, I am still getting the issue. Here are two callstacks after commenting out the OnBarsReceived (MST timestamps):

Requesting contract id history of: 276025610
Timestamp: 5/5/2021 2:06:10 PM - Category: 2 - Message: PriceConnection Outgoing: Timestamp: 5/5/2021 2:06:10 PM - Category: 4 - Message: Subscribe to price for contract: ZSN21
Timestamp: 5/5/2021 2:06:10 PM - Category: 2 - Message: PriceConnection Outgoing: Timestamp: 5/5/2021 2:06:10 PM - Category: 2 - Message: PriceConnection Outgoing: Timestamp: 5/5/2021 2:06:12 PM - Category: 0 - Message: PriceConnection Disconnected: System.Net.Sockets.SocketException (0x80004005): An existing connection was forcibly closed by the remote host
at System.Net.Sockets.Socket.Receive(Byte[] buffer, Int32 offset, Int32 size, SocketFlags socketFlags)
at GF.Net.GFSocket.Receive(Byte[] buffer, Int32 offset, Int32 size, SocketFlags socketFlags)
at GF.Net.PacketSocket.ReadLen(Byte[] buf, Int32 length)
at GF.Net.PacketSocket.Read()
at GF.Net.ProtoSocket.Read[T](Func`2 deserialize)
at GF.Net.ProtoClient`2.ReadLoop()

---------------------------------------

Requesting contract id history of: 276025610
Timestamp: 5/5/2021 2:09:14 PM - Category: 2 - Message: PriceConnection Outgoing: Timestamp: 5/5/2021 2:09:14 PM - Category: 4 - Message: Subscribe to price for contract: ZSN21
Timestamp: 5/5/2021 2:09:14 PM - Category: 2 - Message: PriceConnection Outgoing: Timestamp: 5/5/2021 2:09:14 PM - Category: 2 - Message: PriceConnection Outgoing: Timestamp: 5/5/2021 2:09:17 PM - Category: 0 - Message: PriceConnection Disconnected: System.Net.Sockets.SocketException (0x80004005): An existing connection was forcibly closed by the remote host
at System.Net.Sockets.Socket.Receive(Byte[] buffer, Int32 offset, Int32 size, SocketFlags socketFlags)
at GF.Net.GFSocket.Receive(Byte[] buffer, Int32 offset, Int32 size, SocketFlags socketFlags)
at GF.Net.PacketSocket.ReadLen(Byte[] buf, Int32 length)
at GF.Net.PacketSocket.Read()
at GF.Net.ProtoSocket.Read[T](Func`2 deserialize)
at GF.Net.ProtoClient`2.ReadLoop()
Timestamp: 5/5/2021 2:09:17 PM - Category: 0 - Message: 3 ZSN21: 4096 Bars
---------------------------------------------------

I then attempted to off-load everything from the OnBarsReceived in case for some weird reason something had to happen in the OnBarsReceived callback, I kept all of the callbacks in memory and tried to process them once the history request was done, but still the same issue.
RWare2020
Posts: 206
Joined: Feb 11, 2020


Posted: May 05, 2021 @ 05:17 PM             Msg. 36 of 43
I can't quite tell if this is just a coincidence, but if I request interval of 5 minute before 1 minute, it has worked every time to pull in the 1 minute data.

Timestamp: 5/5/2021 4:11:22 PM - Category: 2 - Message: PriceConnection Outgoing: SubscribeMsg Subscribe=Load Type=Bar StartDate=12/31/1899 11:55:00 PM EndDate=5/5/2021 10:20:00 PM Interval=5 SubscriptionID=4 ContractID=276049534

Timestamp: 5/5/2021 4:11:26 PM - Category: 0 - Message: 4 ZSK21: 4096 Bars BarsMsg SubscriptionID=4 Bars=[4096]

Timestamp: 5/5/2021 4:11:26 PM - Category: 0 - Message: 4 ZSK21: 4096 Bars BarsMsg SubscriptionID=4 Bars=[4096]

Timestamp: 5/5/2021 4:11:26 PM - Category: 0 - Message: 4 ZSK21: 0 Bars BarsMsg SubscriptionID=4

Then since we didn't get all of the data, we request again starting with the last date we received:

Timestamp: 5/5/2021 4:11:26 PM - Category: 2 - Message: PriceConnection Outgoing: SubscribeMsg Subscribe=Load Type=Bar StartDate=3/5/2021 12:10:00 PM EndDate=5/5/2021 10:20:00 PM Interval=5 SubscriptionID=5 ContractID=276049534

Timestamp: 5/5/2021 4:11:27 PM - Category: 0 - Message: 5 ZSK21: 4096 Bars BarsMsg SubscriptionID=5 Bars=[4096]

Timestamp: 5/5/2021 4:11:27 PM - Category: 0 - Message: 5 ZSK21: 4096 Bars BarsMsg SubscriptionID=5 Bars=[4096]

Timestamp: 5/5/2021 4:11:27 PM - Category: 0 - Message: 5 ZSK21: 0 Bars BarsMsg SubscriptionID=5


Why does the 5 minute stop early and the 1 minute keep going? Why can't the 1 minute stop sending back data when some memory limit gets hit and then I can request again like I did the 5 minute?

Just so you know, this re-request thing has been in our code for 10 + years so I think this is something that happens often where not all of the data completely gets sent back.

Why does it not send back all the data and can't that happen with the 1 minute data where we can just re-request?
It still doesn't explain why sometimes it works and sometimes does not, but could be a potential fix.
Edited by RWare2020 on May 05, 2021 05:20 PM
Edited by RWare2020 on May 05, 2021 05:20 PM
RWare2020
Posts: 206
Joined: Feb 11, 2020


Posted: May 05, 2021 @ 05:27 PM             Msg. 38 of 43
This seemed to start happening around the same time the email was sent out for GAIN Trader and saying that you might be prompted for .NET Framework 4.6.2. Could that have anything to do with this?
JSmith5611
Posts: 187
Joined:


Posted: May 06, 2021 @ 08:51 AM             Msg. 40 of 43
Hmm... now this is something i can look into. I'll see if i can find the differences why 5minute bars limit data but 1 minute bars do not.
Jason Smith