Failure on production machine
Posted: Wed Mar 27, 2019 4:14 pm
We run TWSLink on a production machine that hasn't seen any changes in months as well as on a development machine.
Today the production machine failed to make a couple of trades -- here is the log. It basically looks like there is a problem between the API and the IB algo we are using.
I want to emphasize that we have been using the same code unmodified for a couple of years and the same IB algo.
On the development machine, everything is running perfectly. The only difference between the two systems is that the production machine is running on a Windows 2012 server while the development machine is running on Windows 7.
This is a big problem, and if you can't spot the problem, we can rewrite our code to not use the IB algos, but that would be our last choice.
Thank you
Rick
20190327 09:45:00:116; 3212;note;tcExpFunc;PLACE_ORDER;-51192 -0 -BUY -MKT -867 -0.0000000000 -0.0000000000 -DAY --1 -0
20190327 09:45:00:117; 3212;note;tcExpFunc;PLACE_ORDER;ret=106353
20190327 09:45:00:118; 3212;note;tcExpFunc;SET_ORDER_VAL;-106353 -14 -0 --1
20190327 09:45:00:118; 3212;note;tcExpFunc;SET_ORDER_VAL;ret=1
20190327 09:45:00:118; 3212;note;tcExpFunc;SET_ORDER_VAL;-106353 -67 -Adaptive --1
20190327 09:45:00:118; 3212;note;tcExpFunc;SET_ORDER_VAL;ret=1
20190327 09:45:00:118; 3212;note;tcExpFunc;SET_ORDER_VAL;-106353 -68 -adaptivePriority=Normal --1
20190327 09:45:00:118; 3212;note;tcExpFunc;SET_ORDER_VAL;ret=1
20190327 09:45:00:118; 3212;note;tcExpFunc;SET_FA_MEMBERS;-106353 -acc_? - -SPY Algo Alloc - - 1
20190327 09:45:00:119; 4184;action;TWSSocket;FinishRequest;command [placeOrder] transmitted. Bytes sent=250
20190327 09:45:00:119; 4184;note;SmartOrder;openOrderCallExpected;flag=1 uid=106353
20190327 09:45:00:119 [OUT] uid=106353 BUY SPY MKT 867 DAY SMART lmt=0 aux=0 Order in Transit acc_? clientid=1 transmit=IB ref= nref= oca= filled=0 lastfill=0 fa group= fa profile=SPY Algo Alloc fa method= fa percentage= gat= gtd= outside rth=0 hidden=0 algo=Adaptive algo-param=adaptivePriority=Normal oid=3170 permid=0 uidp=0 oidp=0 cid=51192 comment=
20190327 09:45:00:154; 3212;note;tcExpFunc;SET_FA_MEMBERS;ret=1
20190327 09:45:00:241; 3212;note;tcExpFunc;PLACE_ORDER;-51194 -0 -BUY -MKT -2349 -0.0000000000 -0.0000000000 -DAY --1 -0
20190327 09:45:00:245; 3212;note;tcExpFunc;PLACE_ORDER;ret=106354
20190327 09:45:00:245; 3212;note;tcExpFunc;SET_ORDER_VAL;-106354 -14 -0 --1
20190327 09:45:00:245; 3212;note;tcExpFunc;SET_ORDER_VAL;ret=1
20190327 09:45:00:245; 3212;note;tcExpFunc;SET_ORDER_VAL;-106354 -67 -Adaptive --1
20190327 09:45:00:245; 3212;note;tcExpFunc;SET_ORDER_VAL;ret=1
20190327 09:45:00:245; 3212;note;tcExpFunc;SET_ORDER_VAL;-106354 -68 -adaptivePriority=Normal --1
20190327 09:45:00:245; 3212;note;tcExpFunc;SET_ORDER_VAL;ret=1
20190327 09:45:00:246; 3212;note;tcExpFunc;SET_FA_MEMBERS;-106354 -acc_? - -SSO SDS 2X Alloc - - 1
20190327 09:45:00:246; 4184;action;TWSSocket;FinishRequest;command [placeOrder] transmitted. Bytes sent=256
20190327 09:45:00:246; 4184;note;SmartOrder;openOrderCallExpected;flag=1 uid=106354
20190327 09:45:00:246 [OUT] uid=106354 BUY SSO MKT 2349 DAY SMART lmt=0 aux=0 Order in Transit acc_? clientid=1 transmit=IB ref= nref= oca= filled=0 lastfill=0 fa group= fa profile=SSO SDS 2X Alloc fa method= fa percentage= gat= gtd= outside rth=0 hidden=0 algo=Adaptive algo-param=adaptivePriority=Normal oid=3171 permid=0 uidp=0 oidp=0 cid=51194 comment=
20190327 09:45:00:247; 3212;note;tcExpFunc;SET_FA_MEMBERS;ret=1
20190327 09:45:00:471; 4184;note;TWSSocket;position;postions of contract SPY_STK_USD___0.000000_=14 conid=756733 account=acc_35 context=updatePortfolio avg=229.6864285 calls=4 publish_pos=1 publish_pl=1
20190327 09:45:00:472; 4184;note;TWSSocket;position;postions of contract SPY_STK_USD___0.000000_=3 conid=756733 account=acc_10 context=updatePortfolio avg=128.2743666 calls=4 publish_pos=1 publish_pl=1
20190327 09:45:00:472; 4184;note;libwts_db;perf;perf(20-avg,update portfolio)=00:00:00:00:000:358
20190327 09:45:00:472; 4184;note;TWSSocket;position;postions of contract SPY_STK_USD___0.000000_=11942 conid=756733 account=acc_29 context=updatePortfolio avg=90.0185606 calls=4 publish_pos=1 publish_pl=1
20190327 09:45:00:473; 4184;note;TWSSocket;position;postions of contract SSO_STK_USD___0.000000_=21 conid=39622943 account=acc_34 context=updatePortfolio avg=113.9251666 calls=4 publish_pos=1 publish_pl=1
20190327 09:45:00:474; 4184;note;TWSSocket;position;postions of contract SSO_STK_USD___0.000000_=80000 conid=39622943 account=acc_29 context=updatePortfolio avg=11.1481320 calls=4 publish_pos=1 publish_pl=1
20190327 09:45:00:555; 4184;error;API;;API-error: specified algorithm is not allowed for this order. code=442 id=3170
20190327 09:45:00:557; 4184;warning;API;error;unknown error message so far: code=442 message=Specified algorithm is not allowed for this order.
20190327 09:45:00:557; 4184;note;SmartOrder;openOrderCallExpected;flag=0 uid=106353
20190327 09:45:00:557; 4184;error;API;;API-error: specified algorithm is not allowed for this order. code=442 id=3171
20190327 09:45:00:557; 4184;warning;API;error;unknown error message so far: code=442 message=Specified algorithm is not allowed for this order.
Today the production machine failed to make a couple of trades -- here is the log. It basically looks like there is a problem between the API and the IB algo we are using.
I want to emphasize that we have been using the same code unmodified for a couple of years and the same IB algo.
On the development machine, everything is running perfectly. The only difference between the two systems is that the production machine is running on a Windows 2012 server while the development machine is running on Windows 7.
This is a big problem, and if you can't spot the problem, we can rewrite our code to not use the IB algos, but that would be our last choice.
Thank you
Rick
20190327 09:45:00:116; 3212;note;tcExpFunc;PLACE_ORDER;-51192 -0 -BUY -MKT -867 -0.0000000000 -0.0000000000 -DAY --1 -0
20190327 09:45:00:117; 3212;note;tcExpFunc;PLACE_ORDER;ret=106353
20190327 09:45:00:118; 3212;note;tcExpFunc;SET_ORDER_VAL;-106353 -14 -0 --1
20190327 09:45:00:118; 3212;note;tcExpFunc;SET_ORDER_VAL;ret=1
20190327 09:45:00:118; 3212;note;tcExpFunc;SET_ORDER_VAL;-106353 -67 -Adaptive --1
20190327 09:45:00:118; 3212;note;tcExpFunc;SET_ORDER_VAL;ret=1
20190327 09:45:00:118; 3212;note;tcExpFunc;SET_ORDER_VAL;-106353 -68 -adaptivePriority=Normal --1
20190327 09:45:00:118; 3212;note;tcExpFunc;SET_ORDER_VAL;ret=1
20190327 09:45:00:118; 3212;note;tcExpFunc;SET_FA_MEMBERS;-106353 -acc_? - -SPY Algo Alloc - - 1
20190327 09:45:00:119; 4184;action;TWSSocket;FinishRequest;command [placeOrder] transmitted. Bytes sent=250
20190327 09:45:00:119; 4184;note;SmartOrder;openOrderCallExpected;flag=1 uid=106353
20190327 09:45:00:119 [OUT] uid=106353 BUY SPY MKT 867 DAY SMART lmt=0 aux=0 Order in Transit acc_? clientid=1 transmit=IB ref= nref= oca= filled=0 lastfill=0 fa group= fa profile=SPY Algo Alloc fa method= fa percentage= gat= gtd= outside rth=0 hidden=0 algo=Adaptive algo-param=adaptivePriority=Normal oid=3170 permid=0 uidp=0 oidp=0 cid=51192 comment=
20190327 09:45:00:154; 3212;note;tcExpFunc;SET_FA_MEMBERS;ret=1
20190327 09:45:00:241; 3212;note;tcExpFunc;PLACE_ORDER;-51194 -0 -BUY -MKT -2349 -0.0000000000 -0.0000000000 -DAY --1 -0
20190327 09:45:00:245; 3212;note;tcExpFunc;PLACE_ORDER;ret=106354
20190327 09:45:00:245; 3212;note;tcExpFunc;SET_ORDER_VAL;-106354 -14 -0 --1
20190327 09:45:00:245; 3212;note;tcExpFunc;SET_ORDER_VAL;ret=1
20190327 09:45:00:245; 3212;note;tcExpFunc;SET_ORDER_VAL;-106354 -67 -Adaptive --1
20190327 09:45:00:245; 3212;note;tcExpFunc;SET_ORDER_VAL;ret=1
20190327 09:45:00:245; 3212;note;tcExpFunc;SET_ORDER_VAL;-106354 -68 -adaptivePriority=Normal --1
20190327 09:45:00:245; 3212;note;tcExpFunc;SET_ORDER_VAL;ret=1
20190327 09:45:00:246; 3212;note;tcExpFunc;SET_FA_MEMBERS;-106354 -acc_? - -SSO SDS 2X Alloc - - 1
20190327 09:45:00:246; 4184;action;TWSSocket;FinishRequest;command [placeOrder] transmitted. Bytes sent=256
20190327 09:45:00:246; 4184;note;SmartOrder;openOrderCallExpected;flag=1 uid=106354
20190327 09:45:00:246 [OUT] uid=106354 BUY SSO MKT 2349 DAY SMART lmt=0 aux=0 Order in Transit acc_? clientid=1 transmit=IB ref= nref= oca= filled=0 lastfill=0 fa group= fa profile=SSO SDS 2X Alloc fa method= fa percentage= gat= gtd= outside rth=0 hidden=0 algo=Adaptive algo-param=adaptivePriority=Normal oid=3171 permid=0 uidp=0 oidp=0 cid=51194 comment=
20190327 09:45:00:247; 3212;note;tcExpFunc;SET_FA_MEMBERS;ret=1
20190327 09:45:00:471; 4184;note;TWSSocket;position;postions of contract SPY_STK_USD___0.000000_=14 conid=756733 account=acc_35 context=updatePortfolio avg=229.6864285 calls=4 publish_pos=1 publish_pl=1
20190327 09:45:00:472; 4184;note;TWSSocket;position;postions of contract SPY_STK_USD___0.000000_=3 conid=756733 account=acc_10 context=updatePortfolio avg=128.2743666 calls=4 publish_pos=1 publish_pl=1
20190327 09:45:00:472; 4184;note;libwts_db;perf;perf(20-avg,update portfolio)=00:00:00:00:000:358
20190327 09:45:00:472; 4184;note;TWSSocket;position;postions of contract SPY_STK_USD___0.000000_=11942 conid=756733 account=acc_29 context=updatePortfolio avg=90.0185606 calls=4 publish_pos=1 publish_pl=1
20190327 09:45:00:473; 4184;note;TWSSocket;position;postions of contract SSO_STK_USD___0.000000_=21 conid=39622943 account=acc_34 context=updatePortfolio avg=113.9251666 calls=4 publish_pos=1 publish_pl=1
20190327 09:45:00:474; 4184;note;TWSSocket;position;postions of contract SSO_STK_USD___0.000000_=80000 conid=39622943 account=acc_29 context=updatePortfolio avg=11.1481320 calls=4 publish_pos=1 publish_pl=1
20190327 09:45:00:555; 4184;error;API;;API-error: specified algorithm is not allowed for this order. code=442 id=3170
20190327 09:45:00:557; 4184;warning;API;error;unknown error message so far: code=442 message=Specified algorithm is not allowed for this order.
20190327 09:45:00:557; 4184;note;SmartOrder;openOrderCallExpected;flag=0 uid=106353
20190327 09:45:00:557; 4184;error;API;;API-error: specified algorithm is not allowed for this order. code=442 id=3171
20190327 09:45:00:557; 4184;warning;API;error;unknown error message so far: code=442 message=Specified algorithm is not allowed for this order.