php-language-server: [Error] The PHP Language Server server crashed 5 times in the last 3 minutes. The server will not be restarted.

Hello, I’m new to vscode as much as I enjoy it. I have much to learn. I’m getting this error since this morning an I do not know what caused or how to resolve it. I checked other similar problems and didn’t get an answer there.

y Php version is 7.1.9

[Extension Host] Cannot load Xdebug - it was already loaded

t.log @ /C:/Program Files/Microsoft VS Code/resources/app/out/vs/workbench/workbench.main.js:249
/C:/Program Files/Microsoft VS Code/resources/app/out/vs/workbench/workbench.main.js:249 [Extension Host] PHP Fatal error:  Allowed memory size of 2097152 bytes exhausted (tried to allocate 4096 bytes) in C:\Users\Imadh\.vscode\extensions\felixfbecker.php-intellisense-2.2.3\vendor\phpdocumentor\type-resolver\src\Types\ContextFactory.php on line 72

t.log @ /C:/Program Files/Microsoft VS Code/resources/app/out/vs/workbench/workbench.main.js:249
/C:/Program Files/Microsoft VS Code/resources/app/out/vs/workbench/workbench.main.js:249 [Extension Host] Cannot load Xdebug - it was already loaded

t.log @ /C:/Program Files/Microsoft VS Code/resources/app/out/vs/workbench/workbench.main.js:249
/C:/Program Files/Microsoft VS Code/resources/app/out/vs/workbench/workbench.main.js:249 [Extension Host] PHP Fatal error:  Allowed memory size of 2097152 bytes exhausted (tried to allocate 4096 bytes) in C:\Users\Imadh\.vscode\extensions\felixfbecker.php-intellisense-2.2.3\vendor\phpdocumentor\type-resolver\src\Types\ContextFactory.php on line 72

t.log @ /C:/Program Files/Microsoft VS Code/resources/app/out/vs/workbench/workbench.main.js:249
/C:/Program Files/Microsoft VS Code/resources/app/out/vs/workbench/workbench.main.js:249 [Extension Host] Cannot load Xdebug - it was already loaded

t.log @ /C:/Program Files/Microsoft VS Code/resources/app/out/vs/workbench/workbench.main.js:249
/C:/Program Files/Microsoft VS Code/resources/app/out/vs/workbench/workbench.main.js:249 [Extension Host] PHP Fatal error:  Allowed memory size of 2097152 bytes exhausted (tried to allocate 4096 bytes) in C:\Users\Imadh\.vscode\extensions\felixfbecker.php-intellisense-2.2.3\vendor\phpdocumentor\type-resolver\src\Types\ContextFactory.php on line 72

t.log @ /C:/Program Files/Microsoft VS Code/resources/app/out/vs/workbench/workbench.main.js:249
/C:/Program Files/Microsoft VS Code/resources/app/out/vs/workbench/workbench.main.js:249 [Extension Host] Cannot load Xdebug - it was already loaded

t.log @ /C:/Program Files/Microsoft VS Code/resources/app/out/vs/workbench/workbench.main.js:249
/C:/Program Files/Microsoft VS Code/resources/app/out/vs/workbench/workbench.main.js:249 [Extension Host] PHP Fatal error:  Allowed memory size of 2097152 bytes exhausted (tried to allocate 4096 bytes) in C:\Users\Imadh\.vscode\extensions\felixfbecker.php-intellisense-2.2.3\vendor\phpdocumentor\type-resolver\src\Types\ContextFactory.php on line 72

t.log @ /C:/Program Files/Microsoft VS Code/resources/app/out/vs/workbench/workbench.main.js:249
/C:/Program Files/Microsoft VS Code/resources/app/out/vs/workbench/workbench.main.js:249 [Extension Host] Cannot load Xdebug - it was already loaded

t.log @ /C:/Program Files/Microsoft VS Code/resources/app/out/vs/workbench/workbench.main.js:249
/C:/Program Files/Microsoft VS Code/resources/app/out/vs/workbench/workbench.main.js:249 [Extension Host] PHP Fatal error:  Allowed memory size of 2097152 bytes exhausted (tried to allocate 4096 bytes) in C:\Users\Imadh\.vscode\extensions\felixfbecker.php-intellisense-2.2.3\vendor\phpdocumentor\type-resolver\src\Types\ContextFactory.php on line 72

t.log @ /C:/Program Files/Microsoft VS Code/resources/app/out/vs/workbench/workbench.main.js:249
/C:/Program Files/Microsoft VS Code/resources/app/out/vs/workbench/workbench.main.js:2744 The PHP Language Server server crashed 5 times in the last 3 minutes. The server will not be restarted.`

About this issue

  • Original URL
  • State: closed
  • Created 6 years ago
  • Reactions: 1
  • Comments: 23 (8 by maintainers)

Most upvoted comments

Try to change it in VS Code in User Settings

{
 "php.memoryLimit": "2G",
}

If you use 32bit version of PHP, the 4G settings made this: “Server server crashed 5 times in the last 3 minutes. The server will not be restarted.” So, I decreased 4G (4096MB) to only 4095MB and everything works fine.

This is actually an issue in the vscode extension so closing here.