felixfbecker / php-language-server

PHP Implementation of the VS Code Language Server Protocol 🆚↔🖥
ISC License
1.16k stars 185 forks source link

The PHP Language Server server crashed 5 times in the last 3 minutes. The server will not be restarted #538

Open marcosdefontes opened 7 years ago

marcosdefontes commented 7 years ago

I tried the other solutions to this problem but nothing worked in my case.

System: Ubuntu 16.04 PHP 7.1.2-4 npm 3.10.8 VSCode 1.18.1 Extension PHP IntelliSense 2.0.1

Got a message: "The PHP Language Server server crashed 5 times in the last 3 minutes. The server will not be restarted." Opening the option Help > Toggle Developer Tools and the output is

/usr/share/code/resources/app/out/vs/workbench/workbench.main.js:9 [Extension Host] PHP process disconnected
/usr/share/code/resources/app/out/vs/workbench/workbench.main.js:9 [Extension Host] PHP process connected
/usr/share/code/resources/app/out/vs/workbench/workbench.main.js:9 [Extension Host] PHP process disconnected
/usr/share/code/resources/app/out/vs/workbench/workbench.main.js:9 [Extension Host] PHP process connected
/usr/share/code/resources/app/out/vs/workbench/workbench.main.js:9 [Extension Host] PHP process disconnected
/usr/share/code/resources/app/out/vs/workbench/workbench.main.js:9 [Extension Host] PHP process connected
/usr/share/code/resources/app/out/vs/workbench/workbench.main.js:9 [Extension Host] PHP process disconnected
/usr/share/code/resources/app/out/vs/workbench/workbench.main.js:9 [Extension Host] PHP process connected
/usr/share/code/resources/app/out/vs/workbench/workbench.main.js:9 [Extension Host] PHP process disconnected
/usr/share/code/resources/app/out/vs/workbench/workbench.main.js:9 The PHP Language Server server crashed 5 times in the last 3 minutes. The server will not be restarted.

The Console (PHP Language) output is:

Parsing file:///home/00448406160/projetos/Development/Diakonia/vendor/autoload.php
[Info  - 15:17:54] Connection to server got closed. Server will restart.
[Info  - 15:17:55] 5891 files total
[Info  - 15:17:55] Indexing project for definitions and static references
Parsing file:///home/00448406160/projetos/Development/Diakonia/vendor/autoload.php
[Error - 15:17:55] Connection to server got closed. Server will not be restarted.
felixfbecker commented 7 years ago

Hard to tell without any kind of stack trace

chrisjung-dev commented 7 years ago

I geht this while hovering some Classes while the parser runs:

[Info  - 08:15:31] 73 Packages
[Info  - 08:15:31] Restored php-di/php-di:5.4.0 from cache
[Info  - 08:15:31] Restored php-di/invoker:1.3.3 from cache
[Info  - 08:15:31] Restored php-di/phpdoc-reader:2.0.1 from cache
[Info  - 08:15:31] Restored pimcore/installer-plugin:1.5 from cache
[Info  - 08:15:31] Restored container-interop/container-interop:1.1.0 from cache
[Info  - 08:15:31] Restored phpdocumentor/reflection-common:1.0 from cache
[Info  - 08:15:31] Restored phpdocumentor/reflection-docblock:3.1.1 from cache
[Info  - 08:15:31] Restored phpdocumentor/type-resolver:0.2 from cache
[Info  - 08:15:31] Restored psr/log:1.0.2 from cache
[Info  - 08:15:31] Restored vrana/adminer:4.2.5 from cache
[Info  - 08:15:31] Restored linfo/linfo:3.0.1 from cache
[Info  - 08:15:31] Restored geoip2/geoip2:2.4.4 from cache
[Info  - 08:15:31] Restored tijsverkoyen/css-to-inline-styles:1.5.5 from cache
[Info  - 08:15:31] Restored phpspec/prophecy:1.6.1 from cache
[Info  - 08:15:31] Restored pear/net_url2:2.2.1 from cache
[Info  - 08:15:32] Restored neitanod/forceutf8:2.0 from cache
[Info  - 08:15:32] Restored google/apiclient:1.1.8 from cache
[Info  - 08:15:32] Restored paragonie/random_compat:2.0.4 from cache
[Info  - 08:15:32] Restored colinmollenhour/credis:1.7 from cache
[Error - 08:15:33] Connection to server got closed. Server will not be restarted.
[Error - 08:15:33] Request textDocument/hover failed.
Error: Connection got disposed.
    at Object.dispose (/home/cjung/.vscode/extensions/felixfbecker.php-intellisense-2.0.1/node_modules/vscode-jsonrpc/lib/main.js:825:25)
    at Object.dispose (/home/cjung/.vscode/extensions/felixfbecker.php-intellisense-2.0.1/node_modules/vscode-languageclient/lib/client.js:57:35)
    at LanguageClient.handleConnectionClosed (/home/cjung/.vscode/extensions/felixfbecker.php-intellisense-2.0.1/node_modules/vscode-languageclient/lib/client.js:1864:38)
    at LanguageClient.handleConnectionClosed (/home/cjung/.vscode/extensions/felixfbecker.php-intellisense-2.0.1/node_modules/vscode-languageclient/lib/main.js:106:15)
    at closeHandler (/home/cjung/.vscode/extensions/felixfbecker.php-intellisense-2.0.1/node_modules/vscode-languageclient/lib/client.js:1852:18)
    at CallbackList.invoke (/home/cjung/.vscode/extensions/felixfbecker.php-intellisense-2.0.1/node_modules/vscode-jsonrpc/lib/events.js:71:39)
    at Emitter.fire (/home/cjung/.vscode/extensions/felixfbecker.php-intellisense-2.0.1/node_modules/vscode-jsonrpc/lib/events.js:135:36)
    at closeHandler (/home/cjung/.vscode/extensions/felixfbecker.php-intellisense-2.0.1/node_modules/vscode-jsonrpc/lib/main.js:221:26)
    at CallbackList.invoke (/home/cjung/.vscode/extensions/felixfbecker.php-intellisense-2.0.1/node_modules/vscode-jsonrpc/lib/events.js:71:39)
    at Emitter.fire (/home/cjung/.vscode/extensions/felixfbecker.php-intellisense-2.0.1/node_modules/vscode-jsonrpc/lib/events.js:135:36)
[Error - 08:15:33] Request textDocument/hover failed.
Error: Connection got disposed.
    at Object.dispose (/home/cjung/.vscode/extensions/felixfbecker.php-intellisense-2.0.1/node_modules/vscode-jsonrpc/lib/main.js:825:25)
    at Object.dispose (/home/cjung/.vscode/extensions/felixfbecker.php-intellisense-2.0.1/node_modules/vscode-languageclient/lib/client.js:57:35)
    at LanguageClient.handleConnectionClosed (/home/cjung/.vscode/extensions/felixfbecker.php-intellisense-2.0.1/node_modules/vscode-languageclient/lib/client.js:1864:38)
    at LanguageClient.handleConnectionClosed (/home/cjung/.vscode/extensions/felixfbecker.php-intellisense-2.0.1/node_modules/vscode-languageclient/lib/main.js:106:15)
    at closeHandler (/home/cjung/.vscode/extensions/felixfbecker.php-intellisense-2.0.1/node_modules/vscode-languageclient/lib/client.js:1852:18)
    at CallbackList.invoke (/home/cjung/.vscode/extensions/felixfbecker.php-intellisense-2.0.1/node_modules/vscode-jsonrpc/lib/events.js:71:39)
    at Emitter.fire (/home/cjung/.vscode/extensions/felixfbecker.php-intellisense-2.0.1/node_modules/vscode-jsonrpc/lib/events.js:135:36)
    at closeHandler (/home/cjung/.vscode/extensions/felixfbecker.php-intellisense-2.0.1/node_modules/vscode-jsonrpc/lib/main.js:221:26)
    at CallbackList.invoke (/home/cjung/.vscode/extensions/felixfbecker.php-intellisense-2.0.1/node_modules/vscode-jsonrpc/lib/events.js:71:39)
    at Emitter.fire (/home/cjung/.vscode/extensions/felixfbecker.php-intellisense-2.0.1/node_modules/vscode-jsonrpc/lib/events.js:135:36)
chrisjung-dev commented 7 years ago

BTW: I set the Memlimit to 4G, everything is fine :+1:

Still, the error reporting does strange things:

image

marcosdefontes commented 7 years ago

Hard to tell without any kind of stack trace

Any tips on how I can get more detailed information?

dlaynes commented 6 years ago

I'm getting this same error on a Laravel 5.5 project, PHP 7.2 and High Sierra Should I open a new issue? Thanks.

Message from the Developer Tools: Call to a member function isStatic() on null .vscode/extensions/felixfbecker.php-intellisense-2.0.3/vendor/felixfbecker/language-server/src/TreeAnalyzer.php:102

Probably crashes on (but seems unlikely): /routes/console.php (File unedited)

maikel-cit commented 6 years ago

Maybe related to #311 and #336. Set memory to 512M. PHP Language Server is looping parsing all files (infinite loop).

erlangparasu commented 5 years ago

"php.memoryLimit": "4G" works