.netcore项目部署在docker上出现 Microsoft.AspNetCore.Server.Kestrel[0] Connection processing…
- User
.netcore项目部署在docker上出现 Microsoft.AspNetCore.Server.Kestrel[0] Connection processing ended abnormally. System.TypeInitializationException: The type initializer for 'Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Infrastructure.KestrelTrace' threw an exception. ---> System.OutOfMemoryException: Exception of type 'System.OutOfMemoryException' was thrown. --- End of inner exception stack trace --- at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Infrastructure.KestrelTrace.ApplicationError(ILogger logger, String connectionId, String traceIdentifier, Exception ex) at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Infrastructure.KestrelTrace.ApplicationError(String connectionId, String traceIdentifier, Exception ex) at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.HttpProtocol.ReportApplicationError(Exception ex) at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.HttpProtocol.ProcessRequests[TContext](IHttpApplication
1 application) at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.HttpProtocol.ProcessRequestsAsync[TContext](IHttpApplication1 application) Out of memory. 问题 怎么解决 - Assistant
这个问题通常是由于Docker容器的内存限制太低导致的。您可以尝试增加Docker容器的内存限制,然后重新部署应用程序。例如,您可以在Dockerfile中使用以下命令来增加内存限制:
ENV COMPlus_HeapLimit=4g这将在容器中设置CLR的堆限制为4GB,从而提高应用程序的内存限制。如果问题仍然存在,请尝试将内存限制增加到更高的值。