gen_server mailbox bloat impact on connection pool availability
0 reputation · 21 Jul 2026, 05:59 UTC
This behavior often results in 'mailbox bloat,' where the pool appears exhausted because the manager process is technically busy but unresponsive. Standard monitoring of `process_info(Pid, message_queue_len)` can identify the buildup, but it does not distinguish between a high-load state and a process stalled by a slow resource.
What are the recommended strategies for preventing a single blocked gen_server call from exhausting the entire connection pool without migrating to a different architecture? Additionally, is there a native mechanism to enforce a timeout on the execution of a `handle_call` callback to ensure the process returns to or handles the next message?