psalm / psalm-vscode-plugin

VS Code plugin for Psalm
MIT License
44 stars 14 forks source link

Node Child Process Always Exits – Psalm: Exited (Should Restart) #191

Closed 0x00A1FA closed 2 years ago

0x00A1FA commented 2 years ago

Hello,

I've been encountering this issue for a while now. Psalm always exits after briefly showing in the status bar "Psalm: starting".

What could be the problem? The code for the child_process exit is 255.

tm1000 commented 2 years ago

What is displayed in the output window. Please post it here

0x00A1FA commented 2 years ago

Hi! Thanks for the quick reply.

I did not know that there is such a thing as an output window. Very clever.

Output below:

[DEBUG  - 16:27:08] Found the following Psalm XML Configs:
[
  "psalm.xml"
]
[DEBUG  - 16:27:08] Selecting first found config file: psalm.xml
[INFO  - 16:27:08] Starting language server
[DEBUG  - 16:27:08] Finished Extension Activation
[INFO  - 16:27:09] Psalm Version was detected as 4.24.0
[DEBUG  - 16:27:09] Psalm Language Server Version: 4.24.0
[ERROR  - 16:27:12] PHP Fatal error:  Allowed memory size of 536870912 bytes exhausted (tried to allocate 20480 bytes) in vendor\vimeo\psalm\src\Psalm\Internal\Provider\ClassLikeStorageCacheProvider.php on line 137

[DEBUG  - 16:27:12] SERVER ==>
Fatal error: Allowed memory size of 536870912 bytes exhausted (tried to allocate 20480 bytes) in vendor\vimeo\psalm\src\Psalm\Internal\Provider\ClassLikeStorageCacheProvider.php on line 137

[ERROR  - 16:27:12] PHP Fatal error:  Allowed memory size of 536870912 bytes exhausted (tried to allocate 20480 bytes) in vendor\laravel\framework\src\Illuminate\Container\Container.php on line 17

[DEBUG  - 16:27:12] SERVER ==>
Fatal error: Allowed memory size of 536870912 bytes exhausted (tried to allocate 20480 bytes) in vendor\laravel\framework\src\Illuminate\Container\Container.php on line 17

I fixed it by increasing the memory_limit from php.ini from 512 MB to 4 GB.

Thanks!