-
Describe the bugOnce again, thank you for all the fantastic work on this docker image! I have a container running the Is the issue caused by not waiting for the Ostensibly, the error message was triggered by a 1-min heartbeat related request that I use for uptime monitoring. The python on the client side that makes this request looks something like this: from ib_insync import IB
import cronitor
ib_monitor = cronitor.Monitor("ib-monitor")
def connect_ibkr_silent(ib_instance, client_id=1):
port = getIBPort()
try:
ib_instance.connect("127.0.0.1", port, clientId=client_id, timeout=10)
except Exception as e:
return
def ping_ib():
try:
connect_ibkr_silent(ib_for_ping, client_id=999)
if ib_for_ping.isConnected():
logger.trace("Pinging cronitor (ib-monitor)...")
ib_monitor.ping(env=ENV, name="ibkr")
ib_for_ping.disconnect()
except Exception:
ib_for_ping.disconnect() The logs from the docker container look something like this:
To Reproduce
ExpectedI expect these errors to not occur and for the connection to be more stable. Perhaps also expect that the logs say more about this particular issue. Container logsSee above VersionsPlease complete the following information:
|
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 3 replies
-
hi, based on what i can see on the log, it seems that
what could be the cause, well i don't know much details, but i would start looking at
hope it helps |
Beta Was this translation helpful? Give feedback.
-
Hm, from your deductions it seems that some sort of port-related misbehavior is occurring on the part of IB gateway after the nightly restart. I'm going to take a deeper look at this today & see if I can replicate locally during the day.
I've just been using the python code in a literal sense that I posted above lol. In the past, the function called
Currently not using async. Restarting my trading system doesn't fix the issue, so from that I infer that it's likely not due to an async blocking issue in ib_insync. 🤔 Ty for the response though, I really appreciate it. I'll report back with any interesting results as they come. |
Beta Was this translation helpful? Give feedback.
-
I'm removing the "bug" label, as so far we can't say this is caused by the container code base. if your investigation shows that it is please feel free to add it again. |
Beta Was this translation helpful? Give feedback.
Hm, from your deductions it seems that some sort of port-related misbehavior is occurring on the part of IB gateway after the nightly restart. I'm going to take a deeper look at this today & see if I can replicate locally during the day.
I've just been using the python code in a literal sense that I posted above lol. In …