Flow-for-vscode: Flow seems to keep running after closing VSCode

Created on 22 Sep 2016  路  6Comments  路  Source: flowtype/flow-for-vscode

ps aux | grep node seems to show a bunch of flow processes hanging around even after I quit VSCode. There are six flow processes and two flow server --from nuclide --max-workers 6 PROJECT_PATH processes; one that starts with node and another that starts with a long path to flow inside my .nvm directory.

I have not changed the stopFlowOnExit so I assume it should be set to its apparent default value of true which should shut down Flow on exit as far as I can tell.

I am running node 6.2.1 and flow 0.32.0.

bug

Most helpful comment

From that link:

Currently, the extensions are responsible for managing their own processes. So, the flow extension needs to take care of taking down the processes it brought up.

Would be great if this could be taken care of. I'm also noticing zombie flow processes left running after quitting vscode.

Perhaps it would be helpful for this extension to implement a deactivate() function that would kill the child flow processes: https://code.visualstudio.com/docs/extensionAPI/activation-events#_activationevents

All 6 comments

For me this manifests in https://github.com/flowtype/flow-for-vscode/issues/72. If I exit VSCode and restart, flow won't work, I'll get this weird error about empty JSON. However, if I manually kill the process before starting VSCode (or change the .flowconfig and save it without any restart) it will work.

From that link:

Currently, the extensions are responsible for managing their own processes. So, the flow extension needs to take care of taking down the processes it brought up.

Would be great if this could be taken care of. I'm also noticing zombie flow processes left running after quitting vscode.

Perhaps it would be helpful for this extension to implement a deactivate() function that would kill the child flow processes: https://code.visualstudio.com/docs/extensionAPI/activation-events#_activationevents

How difficult can it really be to track down serious bugs like this that have been open for over 3 years?

I'm new to Flow, day 2 and I'm already facing this. If I knew how to kill the Flow server without rebooting, that at least would help!

@ArcaneEngineer on Mac, the following command helped me;
killall flow

Check out the response to @jarecsni 's issue.

https://github.com/flowtype/flow-for-vscode/issues/72#issuecomment-304179008

I followed his advice and added that section to the bottom of my .flowconfig file. Now all the flow processes shut down after closing VSCode. That flow server is no joke... takes up over 150MB of memory.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

micmro picture micmro  路  4Comments

yurtaev picture yurtaev  路  3Comments

vojtatranta picture vojtatranta  路  4Comments

dnepro picture dnepro  路  5Comments

dominictwlee picture dominictwlee  路  5Comments