bmewburn / vscode-intelephense

PHP intellisense for Visual Studio Code
https://intelephense.com
Other
1.56k stars 91 forks source link

Intelephense server is crashing and is not able to connect to server. #2911

Open Hug0-Drelon opened 6 days ago

Hug0-Drelon commented 6 days ago

I experience some trouble with PHP Intelephense lately. No feature are available and error messages keep popping.

Here are some logs:

<--- Last few GCs --->

[89092:0x138009d0000]     8070 ms: Scavenge (interleaved) 506.8 (528.6) -> 506.0 (533.1) MB, pooled: 0 MB, 8.29 / 0.00 ms  (average mu = 0.113, current mu = 0.037) allocation failure; 
[89092:0x138009d0000]     8710 ms: Mark-Compact (reduce) 508.3 (533.6) -> 506.9 (527.6) MB, pooled: 0 MB, 571.88 / 0.00 ms  (+ 0.2 ms in 0 steps since start of marking, biggest step 0.0 ms, walltime since start of marking 581 ms) (average mu = 0.133, curr

<--- JS stacktrace --->

FATAL ERROR: Ineffective mark-compacts near heap limit Allocation failed - JavaScript heap out of memory
 1: 0x11923da2c node::Buffer::New(v8::Isolate*, char*, unsigned long) [/Applications/Visual Studio Code.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Electron Framework]
 2: 0x11923dc60 node::OnFatalError(char const*, char const*) [/Applications/Visual Studio Code.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Electron Framework]
 3: 0x113ca70f8 _$LT$font_types..tag..Tag$u20$as$u20$core..cmp..PartialEq$LT$$u5b$u8$u3b$$u20$4$u5d$$GT$$GT$::eq::h2db382261c616d4e [/Applications/Visual Studio Code.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Electron Framework]
 4: 0x113ca708c _$LT$font_types..tag..Tag$u20$as$u20$core..cmp..PartialEq$LT$$u5b$u8$u3b$$u20$4$u5d$$GT$$GT$::eq::h2db382261c616d4e [/Applications/Visual Studio Code.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Electron Framework]
 5: 0x113e612dc v8::CppHeap::wrapper_descriptor() const [/Applications/Visual Studio Code.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Electron Framework]
 6: 0x113e75e40 v8::internal::StrongRootAllocatorBase::deallocate_impl(unsigned long*, unsigned long) [/Applications/Visual Studio Code.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Electron Framework]
 7: 0x113e757a4 v8::internal::StrongRootAllocatorBase::deallocate_impl(unsigned long*, unsigned long) [/Applications/Visual Studio Code.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Electron Framework]
 8: 0x114578fbc cppgc::internal::AgeTable::ResetForTesting() [/Applications/Visual Studio Code.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Electron Framework]
 9: 0x113e5f8f0 v8::CppHeap::wrapper_descriptor() const [/Applications/Visual Studio Code.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Electron Framework]
10: 0x113e5f780 v8::CppHeap::wrapper_descriptor() const [/Applications/Visual Studio Code.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Electron Framework]
11: 0x113dea9dc v8::Unwinder::PCIsInV8(unsigned long, v8::MemoryRange const*, void*) [/Applications/Visual Studio Code.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Electron Framework]
12: 0x11422c300 v8::internal::TickSample::print() const [/Applications/Visual Studio Code.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Electron Framework]
13: 0x112983574  [/Applications/Visual Studio Code.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Electron Framework]
14: 0x1129602e4  [/Applications/Visual Studio Code.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Electron Framework]
15: 0x15011ad3c 
16: 0x15010d954 
17: 0x15011f928 
18: 0x11292e548  [/Applications/Visual Studio Code.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Electron Framework]
19: 0x1128edd7c  [/Applications/Visual Studio Code.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Electron Framework]
20: 0x1129fb5f8  [/Applications/Visual Studio Code.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Electron Framework]
21: 0x11291b754  [/Applications/Visual Studio Code.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Electron Framework]
22: 0x1128eb618  [/Applications/Visual Studio Code.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Electron Framework]
23: 0x113dbe53c v8::Unwinder::PCIsInV8(unsigned long, v8::MemoryRange const*, void*) [/Applications/Visual Studio Code.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Electron Framework]
24: 0x113dbf12c v8::Unwinder::PCIsInV8(unsigned long, v8::MemoryRange const*, void*) [/Applications/Visual Studio Code.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Electron Framework]
25: 0x113dbf280 v8::Unwinder::PCIsInV8(unsigned long, v8::MemoryRange const*, void*) [/Applications/Visual Studio Code.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Electron Framework]
26: 0x113de9404 v8::Unwinder::PCIsInV8(unsigned long, v8::MemoryRange const*, void*) [/Applications/Visual Studio Code.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Electron Framework]
27: 0x1191890b0 node::CallbackScope::~CallbackScope() [/Applications/Visual Studio Code.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Electron Framework]
28: 0x119189428 node::CallbackScope::~CallbackScope() [/Applications/Visual Studio Code.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Electron Framework]
29: 0x11919db00 node::EmitAsyncDestroy(node::Environment*, node::async_context) [/Applications/Visual Studio Code.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Electron Framework]
30: 0x119245424 node::OnFatalError(char const*, char const*) [/Applications/Visual Studio Code.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Electron Framework]
31: 0x119245b28 node::OnFatalError(char const*, char const*) [/Applications/Visual Studio Code.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Electron Framework]
32: 0x119238a00 node::Buffer::New(v8::Isolate*, char*, unsigned long) [/Applications/Visual Studio Code.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Electron Framework]
33: 0x112b30bcc uv_barrier_destroy [/Applications/Visual Studio Code.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Electron Framework]
34: 0x112b342b4 uv_async_send [/Applications/Visual Studio Code.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Electron Framework]
35: 0x112b44ca4 uv_free_interface_addresses [/Applications/Visual Studio Code.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Electron Framework]
36: 0x112b3477c uv_run [/Applications/Visual Studio Code.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Electron Framework]
37: 0x119189d60 node::MakeCallback(v8::Isolate*, v8::Local<v8::Object>, v8::Local<v8::Function>, int, v8::Local<v8::Value>*) [/Applications/Visual Studio Code.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Electron Framework]
38: 0x11918a8a8 node::SpinEventLoop(node::Environment*) [/Applications/Visual Studio Code.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Electron Framework]
39: 0x112b492a8 v8::ValueSerializer::Delegate::HasCustomHostObject(v8::Isolate*) [/Applications/Visual Studio Code.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Electron Framework]
40: 0x112b4566c ElectronInitializeICUandStartNode [/Applications/Visual Studio Code.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Electron Framework]
41: 0x188473e50 start [/usr/lib/dyld]
[Error - 09:25:17] Server initialization failed.
  Message: Pending response rejected since connection got disposed
  Code: -32097 
[Error - 09:25:17] The intelephense server crashed 5 times in the last 3 minutes. The server will not be restarted. See the output for more information.
[Error - 09:25:17] intelephense client: couldn't create connection to server.
  Message: Pending response rejected since connection got disposed
  Code: -32097 
[Error - 09:25:17] Restarting server failed
  Message: Pending response rejected since connection got disposed
  Code: -32097

Platform and version MacOS 13.2.1 with VSCode 1.90.2 and PHP Intelephense 1.10.4.

bmewburn commented 6 days ago

There's few things you can try:

  1. Check if you have symbolic links in the project that may be causing excessive files to be indexed. Exclude them with a glob pattern in files.exclude.
  2. Try increasing the memory available to the extension with the intelephense.maxMemory setting. (value is in MB).
  3. Supply your own node runtime via the intelephense.runtime setting.
  4. If you are on a remote server with limited memory, increase the server RAM.