-
Notifications
You must be signed in to change notification settings - Fork 6
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
ChannelBroker process will never timeout #2274
Comments
Reading the description of GenServer, the timeout will indeed never be reached, because of the regular calls to the GC. We must remove the default timeout handling with GenServer, and implement our own solution. Solution A: The But what if we got messages handled in-between calls to Solution B: An alternative (maybe simpler) solution could be to save the time at which we last saved the state (in This requires |
@ysbaddaden Can you help evaluating the severity of this bug. What are the risks involved on the broker not timeouting? |
Low. Unless we have lots of channels on a single instance, which might happen if we start grouping instances. It consumes a bit of memory and a few calls every N minutes for each channel. It shouldn't be hard to fix. |
With the GC revamp in #2263 the channel-broker processes will receive a message every some minutes at worst, so
GenServer
will never send a:timeout
and the channel-broker process will never be discontinued.We should replace the timeout mecanism. There should be a regular call (e.g. every 30 minutes) to verify whether the channel broker has nothing left to do (empty queue and no active calls) and decide to terminate the process, after making sure to delete the state from the channel-broker-agent.
The text was updated successfully, but these errors were encountered: