Skip to content

WASM plugins: bound the wait on a plugin's mutex in template hooks #576

Description

@compscidr

From the #575 review. Every page render calls each plugin's template_head/footer/data; the wasm adapter serialises calls behind one mutex per plugin with a 10 s timeout applied only once the mutex is held. A plugin that sleeps ~9 s per hook (never tripping the timeout) or a 120 s run_job holding the mutex stalls every page render for that long.

Proposal: acquire the mutex with a short bound (1–2 s) for template_* hooks (decline with a log when it can't be acquired), keep the full wait for render_page/jobs; optionally run jobs on a separate instance in future. Also surface "instance busy/closed" in Admin → Plugins.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions