help needed on weird TWS disconnect

Discussion in 'Trading Software' started by Xspurt, Oct 3, 2011.

  1. Every day I am getting one to two disconnects and I can't reconnect without rebooting. If I don't reboot TWS goes into auto reconnect and tries forever but can't reconnect.

    I have tried switching ports on my router but it doesn't help. Other datafeeds still run when TWS is out.

    Any ideas how to solve this? Even if I could reconnect without rebooting that would be fine.

  2. I'm afraid that until IB stops with their daily/nightly disconnections this will always be a problem. I have tried several times to find a way around this but unfortunately there is no way to avoid it. I could understand performing a disconnection when markets are closed but IB insists on also resetting data feeds during the middle of markets being open (midnight Eastern for example). With markets being practically 24 hours and driven by world events that frequently happen at night this practice makes no sense and is indeed very risky for their clients who trade at night or carry over positions. I have not found any other data provider that does this.

    (My theory has always been that IB does this sort of thing to clear up a memory leak on the server side of TWS!!)

    Usually TWS reconnects after the daily two disconnects (one for market data and the other for account) but every so often it gets hung in the "Pink" screen where all of the rows are outlined in pink. Others have suggested some hotkey combinations but I have not found them to be helpful in this situation and a manual restart of TWS is necessary.

    Several of the practices at IB do not make sense in a 24/6 environment and this is one of them.
  3. Thanks for the comments.

    This is not happening during reset times :(
  4. Sounds like you may have an issue with your Internet provider then. I haven't experienced any random disconnects with IB recently. Try these hot-keys also the next time it happens and see if it reconnects without restarting TWS:

    For Reconnect - Ctrl-Alt-R,

    For data Farm(s) - Ctrl-Alt-F.
  5. Will try that, thanks.

    Other feeds run fine on this and other PC's without this issue. For some reason TWS seems super sensitive to something and the sickner is being forced to reboot.
  6. It's just gone again and the hot keys don't work :(
  7. What version of TWS are you on? I've had very few disconnection/reconnection issues so far with 918. Also, it is very strange that you would have to reboot. What happens when you try and close TWS?

    This may also be a memory issue, especially if TWS is hanging so bad you have to reboot. How much RAM does your system have? I wouldn't run TWS with less than 4gb total on my system because it is a memory hog and especially running other data feeds at the same time. Check that you are giving TWS enough memory in the startup parameters (768mb - 1024mb should be enough) and as a last resort uninstall the Java VM you are currently using and upgrade to a newer one.
  8. 918.8
    2GB ram and using 1.32GB when everything is flat out

    If I don't reboot TWS goes into superfast reconnect and I can't enter my security code in time unless I shut TWS down. If I do manage to shut TWS down and restart it, she tries forever to reconnect without success but connects 1st time after a reboot.

    TWS has been stable but a week ago it started to play up.

    Where do I find the startup parameters for TWS?
  9. Ok, this is helpful. You probably want to upgrade your RAM at some point or in the meantime reduce the number of symbols you are using in TWS. Running TWS with 2gb is really bare bones if you subscribe to a lot of symbols and especially if you have other stuff running also it is probably going to cause problems for you.

    You can check how much memory you are giving TWS by editing the shortcut you use to Launch it (I'm assuming you are using Windows). There is a string in there and look for the parameter -Xmx###M. The numbers following -Xmx are the megabytes of memory allocated when TWS starts. It should be at least 768. Try bumping up to 1024 and see what happens. I'm afraid though that you won't have enough memory to go up to 1024mb with only 2gb system RAM :(.
  10. Ha I only use 4 symbols lol

    Thanks for all the help, I'll try that
    #10     Oct 3, 2011