-
Notifications
You must be signed in to change notification settings - Fork 112
Hundrets of flow processes #172
Comments
This might be the solution: #150 |
Hey, I'll second and third this. We disabled the Flow for VS Code extension, as this started happening when we upgraded to the latest version of Flow. Running Flow from command line has no problems, but the VS Code extension will max out RAM on our systems to the extent that even the Internet doesn't work for some reason. Opening Task Manager, we see Flow running an unbelievable number of times -- closing the dozens of instances will get Internet back for us. This has happened on multiple dev machines and very reliably and repeatably. Something about the extension is causing flow.exe to run an infinite number of times in the latest version of Flow. I really hope this is fixed, because I miss having inline annotations for Flow errors. But right now, it is impossible for me or my team to use this extension. |
This is a project run by volunteers, you're welcome to help improve it 👍 |
Just because I know how to use Flow doesn't mean I know how to write VS Code extensions. Just reporting that y'all have a memory leak. |
I would love to help also as this is rather annoying. Unfortunately, I am on the same page as @CharlesStover . Perhaps we can approach this more collaboratively and shoot some ideas what might be an actual culprit? |
A VS Code extension is just a node module, it's not different than most JS codebases - I'd recommend setting it up, adding a few logs and using the dev build to see if you can re-produce |
flow version 63.1 + VSCode, kills my new mac 2.8GHz i7 16RAM with tons of processes, can't even kill it correctly with :
it restarts with tons of other processes again. had to do force quit from the p-list and close VSCode. |
I kinda want to thank you for this issue. It forced me to switch to Typescript which I was afraid of for so long and now I am much happier. I don't want to pose as some cheap traveling salesman here, I am just an honest developer. I am sorry if I hurt someone's feelings here ;) |
Still a huge problem with Flow 0.82 plugin |
Closes flow#172
I usually use |
They should name it Slow not Flow.. |
Currently have +10 flow processes running when using Flow & Visual Studio Code
|
|
@karltaylor I can get them to stop when I manually kill them from activity monitor |
@FDiskas This is correct If I run Then running After a few reinstalls and leaving flow to do it's thing (and adding |
Getting the same issue, yet flow stop doesn't work for me:
|
I was having a problem with many flow processes hanging around in the Mac Activity Monitor. To fix this, I changed my flow command from For what it's worth, I use flow in a pre-commit git hook using https://www.npmjs.com/package/pre-commit |
@jeffymahoney You can just run |
Thanks, I'll give that a shot |
Why is this closed? It's still an issue. At the very least, you could lower the priority of the process. What about adding code that checks the number of existing Flow language servers and cap them to 3x the number of CPU cores? On Linux, you could use CGroups to limit the CPU and memory consumption of the processes. |
As far as I understand, this issue was about Flow processes not being terminated correctly when the extension was closed. Over time, tens or hundreds of processes would be left hanging in the background. |
@noppa I can't see how many process are running because my machine immediately locks up. |
I am having the same issue. Funny enough, I am the only one in my team that's having the issue. We all have the exact same machines using the same codebase and VSCode configuration. We moved from I am talking my MacBook becomes unusable because I have 5-9 flow processes running. Each one of them taking between 1.4GB to 2GB of RAM. The MacBook has 16GB and 80% of it is taken by flow. |
This code should have some impact on the number of processes: _getMaxWorkers(): number {
return Math.max(os.cpus().length - 2, 1);
} Maybe make this configurable? |
@indolering Huh, yeah looks like I was wrong. I agree that it could be useful to make that configurable. Just to clarify in case my comments were misleading, I'm just a user of Flow & this extension, I haven't contributed any code in yet and can't make these decisions. |
This is happening for me as well. I have over a dozen flow processes open, altogether eating up about a gig of RAM |
How many processes? Which os? |
I faced many of flow processes and 100% CPU usage even when the editor was closed. |
@georgekpc That implies there are cases where the type checker gets caught in infinite loops. I think the authors need to put in some break cases with error logging if the process runs too long - that way they will find what is causing the problem, through a logged stack trace. |
(Cross-posting my comment from here: amilajack/eslint-plugin-flowtype-errors#27) I've had this issue occur when running multiple versions of I recommend checking if you have a global version installed or if your repo has multiple |
For anyone else running into this problem, in our case it was a problem with Flow running out of memory with its dependency hash table. Naturally, no error is logged about it, the server just crashes and is restarted over and over again which results in the above. Increasing the hash table size in [options]
server.max_workers=1
sharedmemory.hash_table_pow=22 |
As you can see in the following screenshot, I currently have 733 hanging flow process. if I execute the flow commands they do also hang. If I kill the server (process 30088 and 30064 in my example), all processes will be killed and a new server will respawn.
If I run the flow command dirctly in the root folder I DO NOT get those problems. I'm kind of clueless how to continue. Anybody with an idea about the problem?
About my system, the versions and configurations:
Thank you very much for any idea and/or support!
The text was updated successfully, but these errors were encountered: