VBCSCompiler service remains in memory after `dotnet build` and consumes 100% of 1 CPU core and a lot of memory on Ubuntu

See original GitHub issue

From @NikolayPianikov on June 7, 2018 12:40

Steps to reproduce

  • create a temp directory with long full name (~>100 symbols)
  • set the environment variable TMPDIR as full path to this temp directory
  • build some dotnet project

⚠️ the memory runs out quickly and only the computer restart helps in some cases

Sample repo

Expected behavior

At least do not consume CPU and memory so hard

Actual behavior

The process like

/usr/share/dotnet/dotnet/usr/share/dotnet/sdk/2.1.300/Roslyn/bincore/VBCSCompiler.dll -pipename: xxx.F.DCgnN5efPzMYmbzHdZB6DrTe

consumes 100% of 1 CPU core and a lot of memory

Environment data

dotnet --version: 2.1.300 Ubuntu 18.04 LTS

Copied from original issue: dotnet/cli#9434

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:1
  • Comments:8 (3 by maintainers)

github_iconTop GitHub Comments

2reactions
livarcocccommented, Jun 7, 2018

You can turn off the VBCSCompiler by setting UseSharedCompilation=false. You can do that as a parameter to the build command, you can set that as a MSBuild property in your projects or you can set that as an environment variable.

You can also use the dotnet build-server shutdown command to stop any long running servers spawned by the CLI once your build is done.

I will also move this issue to Roslyn to be investigated there.

0reactions
agockecommented, Aug 30, 2018

Yup, this looks like a duplicate of https://github.com/dotnet/roslyn/issues/24137

Read more comments on GitHub >

github_iconTop Results From Across the Web

VBCSCompiler high CPU usage on server
Recently, after copying the C# and ASPX files to my server, i realized that the VBCSCompiler.exe has hit higher CPU usage that can...
Read more >
C#: Out of memory during dotnet build after migrate to NET 5
Today we migrate project from ASP.NET Core 3.1 to NET 5 . After that dotnet build start consuming a lot of RAM (allocate...
Read more >
Help to reduce cpu usage 100% on laptop with ubuntu 20.04
With the same tools using 18.04, there was a high memory usage issue, where my laptop stops responding/gets frozen when RAM is above...
Read more >
Troubleshooting high memory usage with ASP.NET Core ...
Chasing down why ASP.NET Core applications might use unreasonably much memory in Kubernetes, and how to it can be mitigated.
Read more >
Rider 2022.3 takes 20 minutes to load .NET solution~200 ...
2022.2.4 Works fine on the same solution. Have a memory snapshot, but can't upload here, so it's too large.
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