Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Determing TWS crash reason #41

Closed
rok-povsic opened this issue Jan 30, 2019 · 2 comments
Closed

Determing TWS crash reason #41

rok-povsic opened this issue Jan 30, 2019 · 2 comments

Comments

@rok-povsic
Copy link

rok-povsic commented Jan 30, 2019

Hello, after running for some time TWS/IBC crashed at a seemingly random point. Below is the log of that whole day.

Is it possible to see what caused the crash and how to avoid it in the future?

...
2019-01-29 18:15:01:614 IBC: Detected dialog entitled: Shutdown progress; event=Activated
2019-01-29 18:15:01:627 IBC: Detected dialog entitled: Shutdown progress; event=Opened
2019-01-29 18:15:01:665 IBC: Detected frame entitled: DU600365 Exit Session Setting (Simulated Trading); event=Closed
2019-01-29 18:15:02:690 IBC: Detected dialog entitled: Uploading settings to server; event=Closed
2019-01-29 18:15:04:953 IBC: Detected dialog entitled: Uploading settings to server; event=Closed
2019-01-29 18:15:12:939 IBC: Detected dialog entitled: Uploading settings to server; event=Closed
2019-01-29 18:15:13,041 JTS-IA Stopper-150239 ERROR Attempted to append to non-started appender d
2019-01-29 18:15:13,049 NIA-Input-Queue-2 ERROR Attempted to append to non-started appender d
2019-01-29 18:15:13,050 NIA-Input-Queue-2 ERROR Attempted to append to non-started appender d
2019-01-29 18:15:13,210 NIA-Input-Queue-2 ERROR Attempted to append to non-started appender d
2019-01-29 18:15:13:735 IBC: Detected frame entitled: Loading...; event=Closed

TWS finished at Tue 01/29/2019 18:15:14.99

IBC running TWS 972 has finished at Tue 01/29/2019 18:15:15.03

I'm using IBC 3.7.4 and TWS 972. Here's the IBC configuration used:

LogToConsole=no
FIX=no
IbLoginId=<LOGIN>
IbPassword=<PASS>
FIXLoginId=
FIXPassword=
TradingMode=paper
IbDir=C:\\JtsPaper
StoreSettingsOnServer=no
MinimizeMainWindow=no
ExistingSessionDetectedAction=primary
AcceptIncomingConnectionAction=accept
ShowAllTrades=no
OverrideTwsApiPort=
ReadOnlyLogin=no
AcceptNonBrokerageAccountWarning=yes
IbAutoClosedown=no
ClosedownAt=
AllowBlindTrading=no
DismissPasswordExpiryWarning=no
DismissNSEComplianceNotice=yes
SaveTwsSettingsAt=
CommandServerPort=7462
ControlFrom=
BindAddress=
CommandPrompt=
SuppressInfoMessages=yes
LogComponents=never

@rlktradewright Thank you for making this software!

@rlktradewright
Copy link
Member

[First, on a practical note, please don't quote the logfile in the post: just attach the complete file using the 'Attach files by dragging & dropping or selecting them'. Everything in the logfile is there because it's potentially useful, and when users prune some of it out it's often counterproductive. Also a file is much easier to work with, not least because quoting log files often does nasty things with fonts (don't know why: it's a Github thing), and long quoted extracts are just annoying to have to scroll over all the time. On the other hand, if the logfile contains output from more than one IBC run, you can certainly prune out all but the relevant run to reduce size.]

Actually neither IBC nor TWS have crashed here. TWS has simply done a tidy closedown. Because you haven't included the whole log, I can't tell how long TWS has been running. But even if you use IbAutoClosedown=no, there are occasions where TWS will simply shut down and there's nothing IBC can do about it. In my experience this usually happens after IBC has kept TWS running for several days, but there's no way of predicting it. I used to try and keep TWS running all week, and most weeks it would be ok, but just occasionally it would shut down like this.

The solution is simply not to use IbAutoClosedown=no, and to restart TWS every day (which of course is what IB have always wanted us to do).

When you move to TWS 974, you will no longer be able to use IbAutoClosedown=no anyway, because IB have inhibited the mechanism by which it worked. So it's probably a god idea to start thinking about this and what impact it will have on you sooner rather than later.

@rok-povsic
Copy link
Author

rok-povsic commented Jan 30, 2019

@rlktradewright

Understood about quoting. I've removed most of the log lines since they are not relevant.

The first log in that file was written at 2019-01-25 10:30:48:409. So it's been running for 4 days and almost 8 hours.

I've read about TWS 974 changing the login window, but I'd like to stay at the version marked as stable. In any case, I guess the best thing is to restart daily.

Thank you for your answer!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants