Skip to content

Handle :EXIT messages in ingestion WriteBuffer#6454

Open
SAY-5 wants to merge 2 commits into
plausible:masterfrom
SAY-5:fix-writebuffer-exit-trap
Open

Handle :EXIT messages in ingestion WriteBuffer#6454
SAY-5 wants to merge 2 commits into
plausible:masterfrom
SAY-5:fix-writebuffer-exit-trap

Conversation

@SAY-5

@SAY-5 SAY-5 commented Jun 18, 2026

Copy link
Copy Markdown

Changes

Plausible.Ingestion.WriteBuffer calls Process.flag(:trap_exit, true) so terminate/2 can flush the buffer on shutdown, but handle_info/2 only matched :tick. When a linked port or process (the ClickHouse connection socket) exits, the GenServer receives {:EXIT, port, :normal} and crashes with a FunctionClauseError, then restarts. This adds a handle_info/2 clause that ignores :EXIT messages so the buffer keeps running. Fixes #6382.

Signed-off-by: Sai Asish Y <say.apm35@gmail.com>
@CLAassistant

CLAassistant commented Jun 18, 2026

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

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

Successfully merging this pull request may close these issues.

FunctionClauseError in WriteBuffer.handle_info/2 on {:EXIT, port, :normal}

2 participants