Skip to content

Connection to server got closed. Server will restart. #150

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

Closed
cesaraaron opened this issue Nov 16, 2016 · 9 comments
Closed

Connection to server got closed. Server will restart. #150

cesaraaron opened this issue Nov 16, 2016 · 9 comments

Comments

@cesaraaron
Copy link

Hi.
I'm having problems with the extension.
Doesn't work and always throws five times the 'Connection to server got closed. Server will restart' and then shuts down.

The console log is always:

PHP Fatal error: Method AdvancedJsonRpc\ErrorResponse::__toString() must not throw an exception, caught TypeError: Return value of AdvancedJsonRpc\Message::__toString() must be of the type string, boolean returned in C:\Users\Cesar Aaron.vscode\extensions\felixfbecker.php-intellisense-0.0.11\vendor\felixfbecker\language-server\src\Protocol\Message.php on line 0

@felixfbecker
Copy link
Owner

Could you give me some guidance how to reproduce this?

@corretge
Copy link

corretge commented Nov 16, 2016

Same for me, but I don't see any error:

[Info  - 3:03:08 PM] Parsing file 15078/19685: vendor/symfony/monolog-bundle/DependencyInjection/Compiler/AddSwiftMailerTransportPass.php.
[Info  - 3:03:08 PM] Parsing file 15079/19685: vendor/symfony/monolog-bundle/DependencyInjection/Compiler/DebugHandlerPass.php.
[Info  - 3:03:08 PM] Parsing file 15080/19685: vendor/symfony/monolog-bundle/DependencyInjection/Compiler/LoggerChannelPass.php.

[Info  - 3:03:08 PM] Connection to server got closed. Server will restart.

[Info  - 3:03:20 PM] Parsing file 1/19685: app/AppCache.php

@felixfbecker
Copy link
Owner

@corretge Please go Help > Toggle Developer Tools

@corretge
Copy link

corretge commented Nov 16, 2016

lots of thanks @felixfbecker :)

I will fix it, but FYI:

extensionHost.ts:255 [Extension Host] PHP Fatal error:  Maximum function nesting level of '256' reached, aborting! in /Users/acorretge/.vscode/extensions/felixfbecker.php-intellisense-0.0.11/vendor/nikic/php-parser/lib/PhpParser/NodeAbstract.php on line 97
PHP Stack trace:
PHP   1. {main}() /Users/acorretge/.vscode/extensions/felixfbecker.php-intellisense-0.0.11/vendor/felixfbecker/language-server/bin/php-language-server.php:0
PHP   2. Sabre\Event\Loop\run() /Users/acorretge/.vscode/extensions/felixfbecker.php-intellisense-0.0.11/vendor/felixfbecker/language-server/bin/php-language-server.php:40
PHP   3. Sabre\Event\Loop\

@felixfbecker
Copy link
Owner

Yeah, XDebug a) cripples performance and b) will throw on large files because of recursion depth. @cesaraaron Does this solve your issue too?

@cesaraaron
Copy link
Author

Nope, but I just find out the problem.

It looks that the server gets closed due to the 'overwhelmed' amount of php files outside of the project (I'm working on a wordpress theme and I've got only that folder open in vscode, but it seems the server looks backwards for php files till the root of... ??).

@felixfbecker
Copy link
Owner

It should only search for PHP files inside the workspace

@cesaraaron
Copy link
Author

By the way, how can I do for the server to ignore paths? I got everything working well but I'm having an 'RecursiveDirectoryIterator' exception because the server looks inside the node_modules (and there is always a lot of stuff; needless for this case).

@felixfbecker
Copy link
Owner

felixfbecker commented Nov 18, 2016

#159 #113
Can I close this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants