brownplt / code.pyret.org

Website for serving Pyret to folks.
Other
24 stars 44 forks source link

Extra Processes created when failing to Start server #264

Open SethPoulsen opened 6 years ago

SethPoulsen commented 6 years ago

If I do npm run start to start a local server running the site, and it fails because the port is already taken, the terminal will keep outputting

Error: listen EADDRINUSE :::5000
    at Server.setupListenHandle [as _listen2] (net.js:1342:14)
    at listenInCluster (net.js:1383:12)
    at Server.listen (net.js:1471:7)
    at Function.listen (/Users/seth/pyret/code.pyret.org/node_modules/express/lib/application.js:618:24)
    at Object.start (/Users/seth/pyret/code.pyret.org/src/server.js:604:20)
    at /Users/seth/pyret/code.pyret.org/src/run.js:22:10
    at Promise.apply (/Users/seth/pyret/code.pyret.org/node_modules/q/q.js:1165:26)
    at Promise.promise.promiseDispatch (/Users/seth/pyret/code.pyret.org/node_modules/q/q.js:788:41)
    at /Users/seth/pyret/code.pyret.org/node_modules/q/q.js:1391:14
    at runSingle (/Users/seth/pyret/code.pyret.org/node_modules/q/q.js:137:13)
Emitted 'error' event at:
    at emitErrorNT (net.js:1362:8)
    at process._tickCallback (internal/process/next_tick.js:114:19)
    at Function.Module.runMain (module.js:692:11)
    at startup (bootstrap_node.js:194:16)
    at bootstrap_node.js:666:3
Program node src/run.js exited with code 1

Until I close the terminal tab (ctrl+c doesn't even work to kill it). Afterward, it seems like I have a bunch of resources being taken up by some processes that it spun off. The first three lines of ps aux are

seth             82135  18.2  0.5  4948324  44676   ??  S     4:32PM   0:11.69 node /Users/seth/pyret/code.pyret.org/node_modules/.bin/supervisor --poll-interval 700 --watch sr
seth             69541  18.1  0.9  4987592  75552   ??  S     4:29PM   0:42.89 node /Users/seth/pyret/code.pyret.org/node_modules/.bin/supervisor --poll-interval 700 --watch sr
seth             90074  14.8  0.8  4399988  63408   ??  S     4:33PM   0:06.84 /System/Library/CoreServices/ReportCrash agent

I had a similar problem once when the server failed to run because the build failed--it had an infinite loop showing a failure message, then left behind processes that kept taking up resources on my machine.

schanzer commented 6 months ago

@blerner and @jpolitz is this still an issue?