Python Intellisense stops working when connected via SSH to AWS EC2 Instance
Issue Type: Bug
It is hard to reproduce this issue. But usually this happens when I'm connected to an AWS EC2 instance via SSH and running my heavy python project in debugger mode.
After a debugging session, the outline view disappears, I can't jump to variable/function definitions and intellisense stops working.
The usual solution is rebooting the remote server for all the features to work again. But stops working after a debugging session.
Extension version: 2022.6.2 VS Code version: Code 1.67.2 (c3511e6c69bb39013c4a4b7b9566ec1ca73fc4d5, 2022-05-17T18:20:57.384Z) OS version: Darwin x64 21.5.0 Restricted Mode: No Remote OS version: Linux x64 5.13.0-1025-aws Connection to 'ssh-remote+7b22686f73744e616d65223a224972656c616e645f4465765f536572766572227d' could not be established Remote OS version: Linux x64 5.15.0-1008-aws Remote OS version: Linux x64 5.13.0-1025-aws Remote OS version: Linux x64 5.13.0-1025-aws
System Info
| Item | Value |
|---|---|
| CPUs | Intel(R) Core(TM) i7-9750H CPU @ 2.60GHz (12 x 2600) |
| GPU Status | 2d_canvas: enabled canvas_oop_rasterization: disabled_off direct_rendering_display_compositor: disabled_off_ok gpu_compositing: enabled metal: disabled_off multiple_raster_threads: enabled_on oop_rasterization: enabled opengl: enabled_on rasterization: enabled raw_draw: disabled_off_ok skia_renderer: enabled_on video_decode: enabled video_encode: enabled webgl: enabled webgl2: enabled |
| Load (avg) | 4, 3, 3 |
| Memory (System) | 16.00GB (0.07GB free) |
| Process Argv | --crash-reporter-id 4189f9aa-04c1-4fd6-acbc-2880fe64a69a |
| Screen Reader | no |
| VM | 0% |
| Item | Value |
|---|---|
| Remote | SSH: Ireland_Dev_Server |
| OS | Linux x64 5.13.0-1025-aws |
| CPUs | Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz (8 x 2499) |
| Memory (System) | 30.90GB (0.34GB free) |
| VM | 0% |
Connection to 'ssh-remote+7b22686f73744e616d65223a224972656c616e645f4465765f536572766572227d' could not be established
| Item | Value |
|---|---|
| Remote | SSH: Staging |
| OS | Linux x64 5.15.0-1008-aws |
| CPUs | Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz (4 x 2499) |
| Memory (System) | 15.34GB (10.63GB free) |
| VM | 0% |
| Item | Value |
|---|---|
| Remote | SSH: Ireland_Dev_Server |
| OS | Linux x64 5.13.0-1025-aws |
| CPUs | Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz (8 x 2499) |
| Memory (System) | 30.90GB (0.34GB free) |
| VM | 0% |
| Item | Value |
|---|---|
| Remote | SSH: Ireland_Dev_Server |
| OS | Linux x64 5.13.0-1025-aws |
| CPUs | Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz (8 x 2499) |
| Memory (System) | 30.90GB (0.34GB free) |
| VM | 0% |
A/B Experiments
vsliv368cf:30146710
vsreu685:30147344
python383:30185418
vspor879:30202332
vspor708:30202333
vspor363:30204092
pythonvspyl392:30443607
pythontb:30283811
pythonvspyt551cf:30345471
pythonptprofiler:30281270
vshan820:30294714
vstes263:30335439
vscorecescf:30445987
pythondataviewer:30285071
vscod805cf:30301675
pythonvspyt200:30340761
binariesv615:30325510
bridge0708:30335490
bridge0723:30353136
vsaa593cf:30376535
vsc1dst:30438360
pythonvs932:30410667
wslgetstarted:30449410
pythonvsnew555:30457759
vscscmwlcmt:30465135
cppdebug:30492333
vsclangdf:30486550
Thanks for the report. Is there a lot of communication happening via SSH when this happens? For example, a lot of text output over SSH?
That's possible. We do a lot of logging which is mostly done on a log file instead of the console. The log file resides on the remote system, obviously. There are usually 3 users using the remote system but only mine seems to have this issue.
Would it be possible to reduce the output and see if this remains an issue? There was an old report of overloaded SSH causing functionality to break. Still looking for that report. Please let me know if reducing the volume of data works. Thanks
From today: the intellisense, outline view, pylance all stopped working even without running a debugging session. All these features, worked initially but while editing the code they stopped working suddenly.
The overloaded SSH may not be the sole reason for this issue. Since my colleagues connect to the same server and run similar scripts over ssh and use VSCode. They don't have this problem as often as I do (everyday). They use windows and I use MacOS if this information helps.
It also stops working during a debugging session. Minimum logging (warning flag) done over ssh.
Adding some swap memory to the system has helped significantly. However, the intellisense still stops working after a while.
I've also noticed this happens when a s3 bucket is mounted on the remote server. Noticed a lot of background s3fs processes going on the server and maybe hogging too many resources for vscode to work.
SSH being overwhelmed would probably be a VS code issue to handle. Pylance doesn't even know we are in SSH mode.