dotnet core 1.1错误-32 EPIPE断管

时间:2017-09-05 13:27:04

标签: .net-core

使用Mac OS& generator-aspnet-spa dotnet核心应用程序。使用Microsoft.AspNetCore 1.1 for kestrel。 控制台呈现"错误-32 EPIPE损坏的管道",因此客户端/ angular2应用程序仍处于加载状态。

这是日志的摘录:

Microsoft.AspNetCore.Server.Kestrel.Internal.Networking.UvException: Error -32 EPIPE broken pipe
fail: Microsoft.AspNetCore.Diagnostics.DeveloperExceptionPageMiddleware[0]
      An unhandled exception has occurred while executing the request
System.Threading.Tasks.TaskCanceledException: A task was canceled.
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)

最令我困惑的是,我所有的" 1.1"过去几个小时在我的操作系统机器上运行的dotnet应用程序。在此之前所有人都没有遇到任何问题。我在这里错过了什么吗?

经过一些研究,这可能是原因:如果请求被阻止/需要太长时间,可能会显示损坏的管道错误=>如果生成客户端的超时,则连接将被关闭,而服务器仍会尝试写入套接字,从而引发该问题。

这里是我的program.cs和我尝试增加连接,但无济于事:

public static void Main(string[] args)
        {
            var config = new ConfigurationBuilder()
                .AddCommandLine(args)
                .Build();
            var host = new WebHostBuilder()
                .UseConfiguration(config)
                .UseKestrel((options)=>
                {
                    options.ShutdownTimeout.Add(new TimeSpan(0, 3, 0));
                })
                .UseContentRoot(Directory.GetCurrentDirectory())
                .UseStartup<Startup>()
                .Build();
            host.Run();
        }

任何人都可以帮助我吗?谢谢!

0 个答案:

没有答案
相关问题