.NET S2I build on OpenShift fails with "Out of memory" error
Issue
-
When building a .NET application on OpenShift Container Platform using Source-to-Image (S2I), the
Buildfails with the following "Microsoft.CSharp.Core...Out of memory" error message visible in thestatusof the Build:conditions: [..] - type: Failed status: 'True' lastUpdateTime: '2023-12-04T14:41:25Z' lastTransitionTime: '2023-12-04T14:41:25Z' reason: GenericBuildFailed message: Generic Build failure - check logs for details. logSnippet: >2- Restore completed. Files already up-to-date ExampleApp -> /opt/app-root/src/ExampleApp/bin/Release/net6.0/ExampleApp.dll /usr/lib64/dotnet/sdk/6.0.125/Roslyn/Microsoft.CSharp.Core...Out of memory. [/opt/app-root/src/Example/Example_1_0.csproj] error: build error: error building at STEP "RUN /usr/libexec/s2i/assemble": error while running runtime: exit status 1 completionTimestamp: '2023-12-04T14:41:25Z' phase: Failed -
The S2I Build fails on some OpenShift Container Platform Nodes but does not fail on other Nodes or other OpenShift Container Platform clusters.
Environment
- Red Hat OpenShift Container Platform (OCP) 4.11
- .NET 6 and later
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.