[ts-gen] cross session orders, client ids

Nils Gebhardt mail at ngebhardt.de
Wed Dec 17 15:30:29 EST 2008


Bill, 


On Wed, 2008-12-17 at 13:45 -0500, pippin at owlriver.net wrote:


[... continued connection problems]

> 
> Now, about times where the banner does not appear as above, and
> in particular where the shim is unable to receive data from the
> IB tws:
> 
> >   The trading shim has connected to the database server
> >   and loaded 51649 products; connected to the IB tws as
> >   client id  9; 
> >
> > Problem: 524 could not obtain IB account info at startup
> > Exiting
> 
> In the text above, the shim has timed out waiting for a
> response from the IB tws for its account info query, so
> that the shim can determine the account code, which is
> required for journalling.  There is a PollTime variable
> that you can set in the .shimrc file, and you are welcome
> to increase it from its default value of three seconds,
> though if the IB tws can't respond to an account info
> query in three seconds, something's wrong.


I put a line 

PollTime        10

into the .shimrc file (variable wasn't present) - is that correct? 
Anyway, appearently it has no effect, the error shows up immediatly. 



> 
> The only possibilities I can see boil down to:
> 
>     (1) the IB tws is slow or unresponsive; and
>     (2) the shim is unable to properly read the
>         first account quad.
> 
> You can distinguish the first case from the second by the
> contents of the log/tws2shim.bin file, once translated by
> the bin/msg.filter script; if the account quads have arrived,
> the shim should have been able to read the first of them,
> and if not, solutions are pretty much outside the shim's
> control.
> 

Appearently there is no log if the conneciton fails. Also, on the
console which starts tws there is a message

21:08:14:690 JTS-EWriter24: [8:23:39:1:0:0:0:ERR] Unable write to socket
client{8} - 


> I often see repeated 524 connect failures whenever there are
> network problems, or the IB tws is otherwise occupied.  In
> particular, if the status color of open orders is maroon, or
> in any case, if the orders/subscriptions page grid has changed
> to magenta, the problem is almost certainly network-related.
> There are also a number of visual alerts in the tws gui that
> seem to block the account info messages, so turning those off
> is also a good idea.  For the common case, though, of network
> delays, you'll need to either fix the problems with connectivity,
> if they are on your end, or else hope IB's servers come up,
> otherwise.
> 

I don't see any network problems, API orders are marked green and ready
to cancel. Actually, if I cancel the API order(s), all connectivity
problems disappear. Monitoring connections with netstat shows that there
are no open blocking new connections.  


regards

Nils



More information about the ts-general mailing list