question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Flood of connection errors and many processes spawned

See original GitHub issue

Sometime in the last two weeks I started getting the error Connection to server is erroring. Shutting down server. in VSCode’s output window with varying frequency during coding sessions. Today while during a lag spike I took a look at the task manager and saw about 20 R terminal front-end processes each taking nearly 100mb of ram. When I killed each process I got an error in VSCode like this one:

[Error - 7:41:10 pm] Connection to server is erroring. Shutting down server.
[Error - 7:41:10 pm] Connection to server is erroring. Shutting down server.
[Error - 7:41:10 pm] Connection to server is erroring. Shutting down server.
[Error - 7:41:10 pm] Connection to server is erroring. Shutting down server.
[Error - 7:41:10 pm] Connection to server is erroring. Shutting down server.
[Error - 7:41:10 pm] Connection to server is erroring. Shutting down server.
R Language Server (18440) exited with exit code 1

I’m on Windows 10, using the latest versions of VSCode and the LSP extension, R 4.0.2, and languageserver 0.3.6

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:28 (13 by maintainers)

github_iconTop GitHub Comments

1reaction
D3SLcommented, Feb 6, 2022

After giving this a bit of use it looks like this is resolved for me too. A reasonable number of processes are spawned up front and they actually close on their own now. Being able to use VSCode instead of RStudio is a big quality of life improvement, to say nothing of the competition to the RStudio monopoly being vital for the R ecosystem’s health.

0reactions
D3SLcommented, May 2, 2022

As noted in this comment I’ve tried that without success unfortunately.

Hi, Maybe you can try to set environment variable R_LANGSVR_POOL_SIZE in your ~/.Renviron to limit the languageserver process, as indicated by renkun-ken.

~/.Renviron in Windows should mean C:\\Users\\user\\Documents\\.Renviron. You could try file.edit("~/.Renviron") in R. If R_LANGSVR_POOL_SIZE=0 is properly specified, then a vscode instance with a R workspace folder open will only spawn two R processes that are constantly running in background, one for languageserver, and the other for R help server. The languageserver will spawn at most two more child processes as you open or change a document but will terminate once the task is done.

Read more comments on GitHub >

github_iconTop Results From Across the Web

SYN flood DDoS attack - Cloudflare
SYN flood attacks work by exploiting the handshake process of a TCP connection. Under normal conditions, TCP connection exhibits three distinct processes in ......
Read more >
Preventing a SYN flood denial of service attack response for ...
By accepting more connections at one time, the Windows SYN flood response can be avoided. The default is 200 connections.
Read more >
12 Common Types of DDoS Attacks Explained - EasyDMARC
DDoS attack types include application layer, volumetric, and protocol-based exploits. Learn about their sub-categories here.
Read more >
Denial-of-service attack - Wikipedia
Denial of service is typically accomplished by flooding the targeted machine or resource with superfluous requests in an attempt to overload systems and...
Read more >
What is a TCP SYN Flood | DDoS Attack Glossary - Imperva
Essentially, with SYN flood DDoS, the offender sends TCP connection requests faster than the targeted machine can process them, causing network saturation.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found