.net core 使用UseLibuv Ubuntu System.OutOfMemoryException设置最小线程数:类型为';System.OutOfMemoryException';

.net core 使用UseLibuv Ubuntu System.OutOfMemoryException设置最小线程数:类型为';System.OutOfMemoryException';,.net-core,cross-platform,ubuntu-18.04,asp.net-core-2.1,kestrel-http-server,.net Core,Cross Platform,Ubuntu 18.04,Asp.net Core 2.1,Kestrel Http Server,我有asp.net core 2.1.6应用程序 它在带有IIS的Windows上运行良好 public static IWebHostBuilder BuildWebHost(string[] args) => WebHost.CreateDefaultBuilder(args) .UseStartup<StartupShutdownHandler>() .UseLibuv(o => o.ThreadCou

我有asp.net core 2.1.6应用程序 它在带有IIS的Windows上运行良好

 public static IWebHostBuilder BuildWebHost(string[] args) => WebHost.CreateDefaultBuilder(args)
                .UseStartup<StartupShutdownHandler>()
               .UseLibuv(o => o.ThreadCount = 1000)  //todo to explore concurrent connection option
                ;
publicstaticiWebHostBuilderbuildWebHost(字符串[]args)=>WebHost.CreateDefaultBuilder(args)
.UseStartup()
.UseLibuv(o=>o.ThreadCount=1000)//todo以探索并发连接选项
;
当我试图在ubuntu上运行同一个应用程序时,我无法启动,并且出现了一些异常。当我注释掉UseLibuv(o=>o.ThreadCount=1000)行时,它就会运行

我得到的例外是

Info: Microsoft.AspNetCore.DataProtection.KeyManagement.XmlKeyManager[0]
      User profile is available. Using '/home/devops/.aspnet/DataProtection-Keys' as key repository; keys will not be encrypted at rest.
info: Microsoft.AspNetCore.DataProtection.KeyManagement.XmlKeyManager[58]
      Creating key {0184c7ca-fe6a-40dc-979f-152a89b50560} with creation date 2019-10-08 14:36:01Z, activation date 2019-10-08 14:36:01Z, and expiration date 2020-01-06 14:36:01Z.
warn: Microsoft.AspNetCore.DataProtection.KeyManagement.XmlKeyManager[35]
      No XML encryptor configured. Key {0184c7ca-fe6a-40dc-979f-152a89b50560} may be persisted to storage in unencrypted form.
info: Microsoft.AspNetCore.DataProtection.Repositories.FileSystemXmlRepository[39]
      Writing data to file '/home/devops/.aspnet/DataProtection-Keys/key-0184c7ca-fe6a-40dc-979f-152a89b50560.xml'.
warn: Microsoft.AspNetCore.Server.Kestrel[0]
      Unable to bind to http://localhost:5000 on the IPv4 loopback interface: 'Exception of type 'System.OutOfMemoryException' was thrown.'.
warn: Microsoft.AspNetCore.Server.Kestrel[0]
      Unable to bind to http://localhost:5000 on the IPv6 loopback interface: 'Exception of type 'System.OutOfMemoryException' was thrown.'.
crit: Microsoft.AspNetCore.Server.Kestrel[0]
      Unable to start Kestrel.
System.IO.IOException: Failed to bind to address http://localhost:5000. ---> System.AggregateException: One or more errors occurred. (Exception of type 'System.OutOfMemoryException' was thrown.) (Exception of type 'System.OutOfMemoryException' was thrown.) ---> System.OutOfMemoryException: Exception of type 'System.OutOfMemoryException' was thrown.
   at System.Threading.Thread.StartInternal()
   at Microsoft.AspNetCore.Server.Kestrel.Transport.Libuv.Internal.LibuvThread.StartAsync()
   at Microsoft.AspNetCore.Server.Kestrel.Transport.Libuv.Internal.LibuvTransport.BindAsync()
   at Microsoft.AspNetCore.Server.Kestrel.Core.KestrelServer.<>c__DisplayClass22_0`1.<<StartAsync>g__OnBind|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.AddressBinder.BindEndpointAsync(ListenOptions endpoint, AddressBindContext context)
   at Microsoft.AspNetCore.Server.Kestrel.Core.LocalhostListenOptions.BindAsync(AddressBindContext context)
   --- End of inner exception stack trace ---
   --- End of inner exception stack trace ---
   at Microsoft.AspNetCore.Server.Kestrel.Core.LocalhostListenOptions.BindAsync(AddressBindContext context)
   at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.AddressBinder.DefaultAddressStrategy.BindAsync(AddressBindContext context)
   at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.AddressBinder.BindAsync(IServerAddressesFeature addresses, KestrelServerOptions serverOptions, ILogger logger, Func`2 createBinding)
   at Microsoft.AspNetCore.Server.Kestrel.Core.KestrelServer.StartAsync[TContext](IHttpApplication`1 application, CancellationToken cancellationToken)

Unhandled Exception: System.IO.IOException: Failed to bind to address http://localhost:5000. ---> System.AggregateException: One or more errors occurred. (Exception of type 'System.OutOfMemoryException' was thrown.) (Exception of type 'System.OutOfMemoryException' was thrown.) ---> System.OutOfMemoryException: Exception of type 'System.OutOfMemoryException' was thrown.
   at System.Threading.Thread.StartInternal()
   at Microsoft.AspNetCore.Server.Kestrel.Transport.Libuv.Internal.LibuvThread.StartAsync()
   at Microsoft.AspNetCore.Server.Kestrel.Transport.Libuv.Internal.LibuvTransport.BindAsync()
   at Microsoft.AspNetCore.Server.Kestrel.Core.KestrelServer.<>c__DisplayClass22_0`1.<<StartAsync>g__OnBind|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.AddressBinder.BindEndpointAsync(ListenOptions endpoint, AddressBindContext context)
   at Microsoft.AspNetCore.Server.Kestrel.Core.LocalhostListenOptions.BindAsync(AddressBindContext context)
   --- End of inner exception stack trace ---
   --- End of inner exception stack trace ---
   at Microsoft.AspNetCore.Server.Kestrel.Core.LocalhostListenOptions.BindAsync(AddressBindContext context)
   at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.AddressBinder.DefaultAddressStrategy.BindAsync(AddressBindContext context)
   at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.AddressBinder.BindAsync(IServerAddressesFeature addresses, KestrelServerOptions serverOptions, ILogger logger, Func`2 createBinding)
   at Microsoft.AspNetCore.Server.Kestrel.Core.KestrelServer.StartAsync[TContext](IHttpApplication`1 application, CancellationToken cancellationToken)
   at Microsoft.AspNetCore.Hosting.Internal.WebHost.StartAsync(CancellationToken cancellationToken)
   at Microsoft.AspNetCore.Hosting.WebHostExtensions.RunAsync(IWebHost host, CancellationToken token, String shutdownMessage)
   at Microsoft.AspNetCore.Hosting.WebHostExtensions.RunAsync(IWebHost host, CancellationToken token)
   at Microsoft.AspNetCore.Hosting.WebHostExtensions.Run(IWebHost host)
   at Auth.Interfaces.Program.Main(String[] args)
Aborted (core dumped)
Info:Microsoft.AspNetCore.DataProtection.KeyManagement.XmlKeyManager[0]
用户配置文件可用。使用“/home/devops/.aspnet/DataProtection Keys”作为密钥存储库;密钥在静止时不会被加密。
信息:Microsoft.AspNetCore.DataProtection.KeyManagement.XmlKeyManager[58]
创建密钥{0184c7ca-fe6a-40dc-979f-152a89b50560},创建日期为2019-10-08 14:36:01Z,激活日期为2019-10-08 14:36:01Z,到期日期为2020-01-06 14:36:01Z。
警告:Microsoft.AspNetCore.DataProtection.KeyManagement.XmlKeyManager[35]
没有配置XML加密程序。密钥{0184c7ca-fe6a-40dc-979f-152a89b50560}可以以未加密的形式保存到存储器中。
信息:Microsoft.AspNetCore.DataProtection.Repositories.FileSystemXmlRepository[39]
将数据写入文件“/home/devops/.aspnet/DataProtection Keys/key-0184c7ca-fe6a-40dc-979f-152a89b50560.xml”。
警告:Microsoft.AspNetCore.Server.Kestrel[0]
无法绑定到http://localhost:5000 在IPv4环回接口上,引发了“System.OutOfMemoryException”类型的异常。
警告:Microsoft.AspNetCore.Server.Kestrel[0]
无法绑定到http://localhost:5000 在IPv6环回接口上,引发了“System.OutOfMemoryException”类型的异常。
crit:Microsoft.AspNetCore.Server.Kestrel[0]
无法启动红隼。
System.IO.IOException:无法绑定到地址http://localhost:5000. ---> System.AggregateException:发生一个或多个错误。(引发了类型为“System.OutOfMemoryException”的异常。)(引发了类型为“System.OutOfMemoryException”的异常。)-->System.OutOfMemoryException:引发了类型为“System.OutOfMemoryException”的异常。
在System.Threading.Thread.StartInternal()中
位于Microsoft.AspNetCore.Server.Kestrel.Transport.Libuv.Internal.LibuvThread.StartAsync()上
位于Microsoft.AspNetCore.Server.Kestrel.Transport.Libuv.Internal.LibuvTransport.BindAsync()处
在Microsoft.AspNetCore.Server.Kestrel.Core.KestrelServer.c_uuDisplayClass22_0`1.d.MoveNext()中
---来自引发异常的上一个位置的堆栈结束跟踪---
位于Microsoft.AspNetCore.Server.Kestrel.Core.Internal.AddressBinder.BindEndpointAsync(ListenOptions端点,AddressBindContext上下文)
位于Microsoft.AspNetCore.Server.Kestrel.Core.LocalhostListenOptions.BindAsync(AddressBindContext上下文)
---内部异常堆栈跟踪的结束---
---内部异常堆栈跟踪的结束---
位于Microsoft.AspNetCore.Server.Kestrel.Core.LocalhostListenOptions.BindAsync(AddressBindContext上下文)
位于Microsoft.AspNetCore.Server.Kestrel.Core.Internal.AddressBinder.DefaultAddressStrategy.BindAsync(AddressBindContext上下文)
位于Microsoft.AspNetCore.Server.Kestrel.Core.Internal.AddressBinder.BindAsync(iServerAddress功能地址、KestrelServerOptions服务器选项、ILogger记录器、Func`2 createBinding)
在Microsoft.AspNetCore.Server.Kestrel.Core.KestrelServer.StartAsync[TContext](IHTTP应用程序'1应用程序,取消令牌取消令牌)
未处理的异常:System.IO.IOException:无法绑定到地址http://localhost:5000. ---> System.AggregateException:发生一个或多个错误。(引发了类型为“System.OutOfMemoryException”的异常。)(引发了类型为“System.OutOfMemoryException”的异常。)-->System.OutOfMemoryException:引发了类型为“System.OutOfMemoryException”的异常。
在System.Threading.Thread.StartInternal()中
位于Microsoft.AspNetCore.Server.Kestrel.Transport.Libuv.Internal.LibuvThread.StartAsync()上
位于Microsoft.AspNetCore.Server.Kestrel.Transport.Libuv.Internal.LibuvTransport.BindAsync()处
在Microsoft.AspNetCore.Server.Kestrel.Core.KestrelServer.c_uuDisplayClass22_0`1.d.MoveNext()中
---来自引发异常的上一个位置的堆栈结束跟踪---
位于Microsoft.AspNetCore.Server.Kestrel.Core.Internal.AddressBinder.BindEndpointAsync(ListenOptions端点,AddressBindContext上下文)
位于Microsoft.AspNetCore.Server.Kestrel.Core.LocalhostListenOptions.BindAsync(AddressBindContext上下文)
---内部异常堆栈跟踪的结束---
---内部异常堆栈跟踪的结束---
位于Microsoft.AspNetCore.Server.Kestrel.Core.LocalhostListenOptions.BindAsync(AddressBindContext上下文)
位于Microsoft.AspNetCore.Server.Kestrel.Core.Internal.AddressBinder.DefaultAddressStrategy.BindAsync(AddressBindContext上下文)
位于Microsoft.AspNetCore.Server.Kestrel.Core.Internal.AddressBinder.BindAsync(iServerAddress功能地址、KestrelServerOptions服务器选项、ILogger记录器、Func`2 createBinding)
在Microsoft.AspNetCore.Server.Kestrel.Core.KestrelServer.StartAsync[TContext](IHTTP应用程序'1应用程序,取消令牌取消令牌)
位于Microsoft.AspNetCore.Hosting.Internal.WebHost.StartAsync(CancellationToken CancellationToken)
位于Microsoft.AspNetCore.Hosting.WebHostExtensions.RunAsync(IWebHost主机、CancellationToken令牌、字符串关闭消息)
位于Microsoft.AspNetCore.Hosting.WebHostExtensions.RunAsync(IWebHost主机,CancellationToken令牌)
在Microsoft.AspNetCore.Hosting.WebHostExtensions.Run(IWebHost主机)上
位于Auth.Interfaces.Program.Main(字符串[]args)
中止(堆芯转储)

根据github上的建议,我已删除UseLibuv选项