Skip to content

dune serve stays alive after a graceful shutdown when anything holds the event loop #47

Closed

Description

@zumbrunn

After SIGTERM, dune serve closes the listener, drains, prints shutdown complete and then just returns. Any ref'd timer keeps the process alive indefinitely at 0% CPU with no listener; a second SIGTERM is needed to end it. About 45 such processes accumulated on one developer machine.

The trigger found was @dune/plugin-admin's collab eviction setInterval (duneorg/plugin-admin#8), but core shouldn't depend on every plugin unref'ing its timers.

Reproduced: one SIGTERM leaves serve alive for 24 s+; process.getActiveResourcesInfo() after shutdown showed exactly one Timeout.

Fix in #38: exit explicitly once the drain is done.

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

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions