You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi,
I am using zerorpc to connect to server. My backend is in python and frontend is in js. Code flashed hex file to MCB chip. When I connect multiple MCBs through PCAN it stops uploading code at random time and gives HeartbeatError: Lost Remote after 10000 ms. I tried changing default HeartbeatInterval from 5000 ms to 10000 ms but it didn't work.
PS: When I try to flash in development mode it flashes all MCBs fine but when I package the code into executable it shows this error.
Can anyone help resolve this issue or disable Heartbeat checks?
Here is the code that connects to server:
Python:
defstart_rpc_server():
address='tcp://122.0.0.0:'+str(parse_port())
cfg_file_name='uds_flasher_cfg.json5'cfg=load_json5_portable(file=cfg_file_name, mode='r') # from json configuration fileserver=zerorpc.Server(UpdateUtility(uds_cfg=cfg['uds_cfg'], system_cfg=cfg['system_cfgs'][platform.system()], bl_cfg=cfg['bl_cfg'], user_cfg=cfg['user_cfg']))
server.bind(address)
print('start running on {}'.format(address))
server.run()
The blocking under concurrent access most likely means that you have a mismatch between async code running on the gevent ioloop and some blocking code.
As a quick test, replace your service object by some mock that does a gevent.sleep(5) for example, and see how many concurrent request you can run.
I wouldn't surprised that the UpdateUtility is blocking the gevent ioloop.
I meant instead of flashing. To show that the flashing operation is most likely a blocking operation. That blocks the current greenlet. In turn blocking the ioloop. You might want to read the documentation of gevent, and more generally about concurrency, parallelism, blocking vs async, and the function coloring problem.
Hi,
I am using zerorpc to connect to server. My backend is in python and frontend is in js. Code flashed hex file to MCB chip. When I connect multiple MCBs through PCAN it stops uploading code at random time and gives HeartbeatError: Lost Remote after 10000 ms. I tried changing default HeartbeatInterval from 5000 ms to 10000 ms but it didn't work.
PS: When I try to flash in development mode it flashes all MCBs fine but when I package the code into executable it shows this error.
Can anyone help resolve this issue or disable Heartbeat checks?
Here is the code that connects to server:
Python:
JS:
The text was updated successfully, but these errors were encountered: