API cannot connect after a while?

Discussion in 'Interactive Brokers' started by nooby_mcnoob, Jul 22, 2019.

  1. Occasionally, I notice that I can no longer connect to TWS through the API. This happens whether it is with Gateway or Workstation.

    I've enabled the log file for now as well as increased the available memory, but neither resetting data or server connections seems to fix the issue, only a full restart of TWS. Needless to say, this isn't very nice.

    Is there any recommendation on how to debug the issue?

    Thanks!
     
  2. d08

    d08

    Does it happen at a certain time or around a certain time or completely randomly?

    Possibilities:
    1. Daily reset periods.
    2. Too many requests (or messaging rate) after which you're kicked off.
     
    blueraincap likes this.
  3. Did not think of the reset period, good idea.

    It's close enough to the reset period, but I feel that it's primarily because it gets "tired" since it it's usually intermittent and often an hour or two before the reset period.

    I'll try setting the reset time to coincide with the forex reset (I think it's 5PM Eastern) and see if that helps. It has never happened during NY trading hours.
     
  4. d08

    d08

  5. That's a different reset there is another one at 5 pm but I can never find the article on it
     
  6. When you're at it, set the TWS (or Gateway) logging level to "Detailed" as that will log as much as possible. The resulting log file will be huge, and difficult to navigate, but at least it will contain everything that is available.
     
    IAS_LLC and nooby_mcnoob like this.
  7. Just FYI, after changing TWS reset/restart time to coincide with forex rollover at 5PM Eastern, I have not seen any issues.
     
    Ryan81 likes this.
  8. d08

    d08

    Yeah I kill the client after reset periods every time. Keeping it running continuously will result in issues.
     
    IAS_LLC likes this.
  9. IAS_LLC

    IAS_LLC

    I don't understand why they require resets....it's absurd . You'd think someone as prolific as IB would have a little more '2019' api.

    I leave rithmic on all week.
     
    d08 and nooby_mcnoob like this.
  10. Just fyi the latest builds can restart automatically, see the configuration
     
    #10     Jul 25, 2019