-
-
Notifications
You must be signed in to change notification settings - Fork 138
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Process killed after 5s after unknown text document error - using Zed #2847
Comments
Yes I have also found out that logging kills the performance of phpactor. It would be interesting to see what code actions are slowing you down. You have to enable profiling for the language server seperately then you can see the performance of your code actions.
|
Here is a log of it happening again with that profiling flag enabled. But just as a side note, I only enabled logging after this issue began occurring in order to see if I could see why, and I have allocated 3GB of memory under Interestingly, this time there are no logs for the process being killed, but it was still stuck as resolving code actions. Hope this means something to you:
|
Nothing immediately problematic, I mean some of the requests are taking a second but there's no explanation why. (Might have to look at the logs with log level debug but that produces A LOT of output. As a recommendation if you want to play around with the settings, you can also try those options:
Don't index cache files and other things
|
I have given that a try with I am replicating this by just opening, putting a space at the end of a random line and quickly saving a few 1000+ line files one after the other, while mixing in a few non-php files like .gitignore and .env files. Seems to cause it to get stuck really consistently for me. I know it also happens for my colleagues as well that use Zed so it's at least not just my machine that's the issue. It is either our repo, or zed/phpactor. I will see if I can make it happen on a different repo. |
Basically Phpactor does not play well with large multi-thousand line files (if that's what you have), and it doesn't really play well with Laravel either (although that's a different topic). The good news is that I'm not working on a large legacy project so maybe I can find ways to improve it... |
Well for projects with big files the bottle neck will probably be the parser. Especially with bigger files an incremental parser would be nice so that only the parts that have change would need to be updated. But that's a very big undertaking. |
Thanks for the attention on this. I was just thinking of having a play around with phpactor locally (was planning to throw a bunch of dumps around just to get an idea of how it works and if I would be able to contribute at all), and the included Error Zed throws:
|
If you want to use phpactor as a language server you need to run it like this: |
Unfortunately Zed doesn't like that either (Since the setting is for the path of the binary, I presume Zed will be starting it with |
In the second line of your debug output there is an "args" parameter, that's probably where this goes. |
That has made it work thank you. I had assumed the other values I wasn't setting would carry over from the default configuration 🤦 |
Context:
phpactor gets stuck "resolving code actions" after a while quickly moving around within a large project. Enabling logging surfaces that the lsp process is killed "because it lived longer than 5s", immediately after an unknown text document error (commonly for a file that isn't even php, such as a .env or other config file).
Log:
It never restarts itself after this happens and I have to manually restart phpactor.
The text was updated successfully, but these errors were encountered: