Skip to content

alpha version: quit command hangs/timeouts on Windows 10 PRO #1531

Description

@userquin

Can be tested with the playground here (node v24.19.0):

  • nr dev at root (one terminal)
  • pnpm nuxt dev (in another terminal)
  • open / and navigate to /ws, then click ping button
  • on playground terminal press q: the process awaits the default timeout (15s) and then logs:
[nitro-runtime] close: 0.054ms
◐  Cleaning up... press Ctrl-C again to exit immediately..
 WARN  force closing dev worker...                                                                                                                                                

◒  Cleaning up... press Ctrl-C again to exit immediately...function                                                                                                                 
│
▲  The dev server did not shut down within 15s: 80 file watchers, 1 worker thread, 1 open connection, 2 timers. Exiting anyway.
◇  Canceled                                                                           

I added a hack to show the opened connections adding the following code before calling summariseActiveResources at setupSignalHandlers in dev.ts:

        const handles = (process as any)._getActiveHandles?.()
        const networkHandles = handles.filter(h => (
          h.constructor.name === 'Socket'
          || h.constructor.name === 'Server'
        ))
        console.dir(networkHandles, { depth: 2 })
        const summary = summariseActiveResources()

Moving this.#websocketConnections.add(socket) before the if statement to allow #closeWebSocketConnections to close also these connections, the 1 open connection dissapear.

I'm working on fixing file watchers...

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