Warning: file_get_contents(/data/phpspider/zhask/data//catemap/6/mongodb/11.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Mongodb系统中打开的文件太多_Mongodb_Asp.net Core 2.0_Kestrel Http Server - Fatal编程技术网

Mongodb系统中打开的文件太多

Mongodb系统中打开的文件太多,mongodb,asp.net-core-2.0,kestrel-http-server,Mongodb,Asp.net Core 2.0,Kestrel Http Server,我们的软件包含: centos、nginx、kestrel http服务器、dotnet核心(v2.0.8)应用程序与mongodb(v3.6.7)协同工作 kestrel http服务器有时会停止响应,似乎来自mongodb驱动程序连接的错误记录在第三行 是什么导致了这个问题 我已使用此主题将max open files选项配置为640000 但没什么问题,请你帮我解决这个问题谢谢大家 May 17 12:37:36 myserver[14611]: fail: Microsoft.AspN

我们的软件包含:

centos、nginx、kestrel http服务器、dotnet核心(v2.0.8)应用程序与mongodb(v3.6.7)协同工作

kestrel http服务器有时会停止响应,似乎来自mongodb驱动程序连接的错误记录在第三行

是什么导致了这个问题

我已使用此主题将max open files选项配置为640000

但没什么问题,请你帮我解决这个问题谢谢大家

May 17 12:37:36 myserver[14611]: fail: Microsoft.AspNetCore.Server.Kestrel[13]
May 17 12:37:36 myserver[14611]: Connection id "0HLDRQRA00CP4", Request id "0HLDRQRA00CP4:00000001": An unhandled exception was thrown by the application.
May 17 12:37:36 myserver[14611]: MongoDB.Driver.MongoConnectionException: An exception occurred while opening a connection to the server. ---> System.Net.Sockets.SocketException: Too many open files in system
May 17 12:37:36 myserver[14611]: at System.Net.Sockets.Socket..ctor(AddressFamily addressFamily, SocketType socketType, ProtocolType protocolType)
May 17 12:37:36 myserver[14611]: at MongoDB.Driver.Core.Connections.TcpStreamFactory.CreateSocket(EndPoint endPoint)
May 17 12:37:36 myserver[14611]: at MongoDB.Driver.Core.Connections.TcpStreamFactory.<CreateStreamAsync>d__4.MoveNext()
May 17 12:37:36 myserver[14611]: --- End of stack trace from previous location where exception was thrown ---
May 17 12:37:36 myserver[14611]: at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
May 17 12:37:36 myserver[14611]: at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
May 17 12:37:36 myserver[14611]: at MongoDB.Driver.Core.Connections.BinaryConnection.<OpenHelperAsync>d__48.MoveNext()
May 17 12:37:36 myserver[14611]: --- End of inner exception stack trace ---
May 17 12:37:36 myserver[14611]: at MongoDB.Driver.Core.Connections.BinaryConnection.<OpenHelperAsync>d__48.MoveNext()
May 17 12:37:36 myserver[14611]: --- End of stack trace from previous location where exception was thrown ---
May 17 12:37:36 myserver[14611]: at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
May 17 12:37:36 myserver[14611]: at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
May 17 12:37:36 myserver[14611]: at MongoDB.Driver.Core.Servers.Server.<GetChannelAsync>d__30.MoveNext()
May 17 12:37:36 myserver[14611]: --- End of stack trace from previous location where exception was thrown ---
May 17 12:37:36 myserver[14611]: at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
May 17 12:37:36 myserver[14611]: at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
May 17 12:37:36 myserver[14611]: at MongoDB.Driver.Core.Operations.FindOperation`1.<ExecuteAsync>d__111.MoveNext()
May 17 12:37:36 myserver[14611]: --- End of stack trace from previous location where exception was thrown ---
May 17 12:37:36 myserver[14611]: at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
May 17 12:37:36 myserver[14611]: at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
May 17 12:37:36 myserver[14611]: at MongoDB.Driver.OperationExecutor.<ExecuteReadOperationAsync>d__3`1.MoveNext()
May 17 12:37:36 myserver[14611]: --- End of stack trace from previous location where exception was thrown ---
May 17 12:37:36 myserver[14611]: at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
May 17 12:37:36 myserver[14611]: at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
May 17 12:37:36 myserver[14611]: at MongoDB.Driver.MongoCollectionImpl`1.<ExecuteReadOperationAsync>d__83`1.MoveNext()
May 17 12:37:36 myserver[14611]: --- End of stack trace from previous location where exception was thrown ---
May 17 12:37:36 myserver[14611]: at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
May 17 12:37:36 myserver[14611]: at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
May 17 12:37:36 myserver[14611]: at MongoDB.Driver.MongoCollectionImpl`1.<UsingImplicitSessionAsync>d__91`1.MoveNext()
May 17 12:37:36 myserver[14611]: --- End of stack trace from previous location where exception was thrown ---
May 17 12:37:36 myserver[14611]: at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
May 17 12:37:36 myserver[14611]: at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
May 17 12:37:36 myserver[14611]: at MongoDB.Driver.IAsyncCursorSourceExtensions.<FirstOrDefaultAsync>d__5`1.MoveNext()
May 17 12:37:36 myserver[14611]: --- End of stack trace from previous location where exception was thrown ---
May 17 12:37:36 myserver[14611]: at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
May 17 12:37:36 myserver[14611]: at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
May 17 12:37:36 myserver[14611]: at MYData.UserCollection.<GetByIdAsync>d__2.MoveNext()
May 17 12:37:36 myserver[14611]: --- End of stack trace from previous location where exception was thrown ---
May 17 12:37:36 myserver[14611]: at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
May 17 12:37:36 myserver[14611]: at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
May 17 12:37:36 myserver[14611]: at MYAPI.Controllers.PostController.<GetForExplore>d__8.MoveNext()
May 17 12:37:36 myserver[14611]: --- End of stack trace from previous location where exception was thrown ---
May 17 12:37:36 myserver[14611]: at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
May 17 12:37:36 myserver[14611]: at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
May 17 12:37:36 myserver[14611]: at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
May 17 12:37:36 myserver[14611]: at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.<InvokeActionMethodAsync>d__12.MoveNext()
May 17 12:37:36 myserver[14611]: --- End of stack trace from previous location where exception was thrown ---
May 17 12:37:36 myserver[14611]: at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
May 17 12:37:36 myserver[14611]: at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
May 17 12:37:36 myserver[14611]: at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.<InvokeNextActionFilterAsync>d__10.MoveNext()
May 17 12:37:36 myserver[14611]: --- End of stack trace from previous location where exception was thrown ---
May 17 12:37:36 myserver[14611]: at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
May 17 12:37:36 myserver[14611]: at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.Rethrow(ActionExecutedContext context)
May 17 12:37:36 myserver[14611]: at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)
May 17 12:37:36 myserver[14611]: at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.<InvokeInnerFilterAsync>d__14.MoveNext()
May 17 12:37:36 myserver[14611]: --- End of stack trace from previous location where exception was thrown ---
May 17 12:37:36 myserver[14611]: at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
May 17 12:37:36 myserver[14611]: at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
May 17 12:37:36 myserver[14611]: at Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.<InvokeNextResourceFilter>d__22.MoveNext()
May 17 12:37:36 myserver[14611]: --- End of stack trace from previous location where exception was thrown ---
May 17 12:37:36 myserver[14611]: at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
May 17 12:37:36 myserver[14611]: at Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.Rethrow(ResourceExecutedContext context)
May 17 12:37:36 myserver[14611]: at Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)
May 17 12:37:36 myserver[14611]: at Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.<InvokeFilterPipelineAsync>d__17.MoveNext()
May 17 12:37:36 myserver[14611]: --- End of stack trace from previous location where exception was thrown ---
May 17 12:37:36 myserver[14611]: at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
May 17 12:37:36 myserver[14611]: at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
May 17 12:37:36 myserver[14611]: at Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.<InvokeAsync>d__15.MoveNext()
May 17 12:37:36 myserver[14611]: --- End of stack trace from previous location where exception was thrown ---
May 17 12:37:36 myserver[14611]: at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
May 17 12:37:36 myserver[14611]: at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
May 17 12:37:36 myserver[14611]: at Microsoft.AspNetCore.Builder.RouterMiddleware.<Invoke>d__4.MoveNext()
May 17 12:37:36 myserver[14611]: --- End of stack trace from previous location where exception was thrown ---
May 17 12:37:36 myserver[14611]: at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
May 17 12:37:36 myserver[14611]: at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
May 17 12:37:36 myserver[14611]: at Microsoft.AspNetCore.Authentication.AuthenticationMiddleware.<Invoke>d__6.MoveNext()
May 17 12:37:36 myserver[14611]: --- End of stack trace from previous location where exception was thrown ---
May 17 12:37:36 myserver[14611]: at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
May 17 12:37:36 myserver[14611]: at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
May 17 12:37:36 myserver[14611]: at Microsoft.AspNetCore.Hosting.Internal.RequestServicesContainerMiddleware.<Invoke>d__3.MoveNext()
May 17 12:37:36 myserver[14611]: --- End of stack trace from previous location where exception was thrown ---
May 17 12:37:36 myserver[14611]: at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
May 17 12:37:36 myserver[14611]: at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
May 17 12:37:36 myserver[14611]: at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.Frame`1.<ProcessRequestsAsync>d__2.MoveNext()
May 17 12:37:36 myserver[14611]:失败:Microsoft.AspNetCore.Server.Kestrel[13]
五月17日12:37:36 myserver[14611]:连接id“0HLDRQRA00CP4”,请求id“0HLDRQRA00CP4:00000001”:应用程序引发了未处理的异常。
May 17 12:37:36 myserver[14611]:MongoDB.Driver.MongoConnectionException:打开与服务器的连接时发生异常。-->System.Net.Sockets.SocketException:系统中打开的文件太多
May 17 12:37:36 myserver[14611]:在System.Net.Sockets.Socket..ctor(AddressFamily AddressFamily,SocketType SocketType,ProtocolType ProtocolType)
5月17日12:37:36 myserver[14611]:位于MongoDB.Driver.Core.Connections.TcpStreamFactory.CreateSocket(端点)
5月17日12:37:36 myserver[14611]:在MongoDB.Driver.Core.Connections.TcpStreamFactory.d_u4.MoveNext()上
5月17日12:37:36 myserver[14611]:---引发异常的前一个位置的堆栈结束跟踪---
五月17日12:37:36 myserver[14611]:在System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()上
5月17日12:37:36 myserver[14611]:在System.Runtime.CompilerServices.TaskWaiter.HandleNonSuccessAndDebuggerNotification(任务任务)
5月17日12:37:36 myserver[14611]:在MongoDB.Driver.Core.Connections.BinaryConnection.d_u48.MoveNext()上
May 17 12:37:36 myserver[14611]:---内部异常堆栈跟踪结束---
5月17日12:37:36 myserver[14611]:在MongoDB.Driver.Core.Connections.BinaryConnection.d_u48.MoveNext()上
5月17日12:37:36 myserver[14611]:---引发异常的前一个位置的堆栈结束跟踪---
五月17日12:37:36 myserver[14611]:在System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()上
5月17日12:37:36 myserver[14611]:在System.Runtime.CompilerServices.TaskWaiter.HandleNonSuccessAndDebuggerNotification(任务任务)
5月17日12:37:36 myserver[14611]:在MongoDB.Driver.Core.Servers.Server.d_u30.MoveNext()上
5月17日12:37:36 myserver[14611]:---引发异常的前一个位置的堆栈结束跟踪---
五月17日12:37:36 myserver[14611]:在System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()上
5月17日12:37:36 myserver[14611]:在System.Runtime.CompilerServices.TaskWaiter.HandleNonSuccessAndDebuggerNotification(任务任务)
5月17日12:37:36 myserver[14611]:在MongoDB.Driver.Core.Operations.findoOperation`1.d_u111.MoveNext()上
5月17日12:37:36 myserver[14611]:---引发异常的前一个位置的堆栈结束跟踪---
五月17日12:37:36 myserver[14611]:在System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()上
5月17日12:37:36 myserver[14611]:在System.Runtime.CompilerServices.TaskWaiter.HandleNonSuccessAndDebuggerNotification(任务任务)
5月17日12:37:36 myserver[14611]:在MongoDB.Driver.OperationExecutor.d_u3`1.MoveNext()上
5月17日12:37:36 myserver[14611]:---引发异常的前一个位置的堆栈结束跟踪---
五月17日12:37:36 myserver[14611]:在System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()上
5月17日12:37:36 myserver[14611]:在System.Runtime.CompilerServices.TaskWaiter.HandleNonSuccessAndDebuggerNotification(任务任务)
5月17日12:37:36 myserver[14611]:在MongoDB.Driver.MongoCollectionImpl`1.d_u83`1.MoveNext()
5月17日12:37:36 myserver[14611]:---引发异常的前一个位置的堆栈结束跟踪---
五月17日12:37:36 myserver[14611]:在System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()上
5月17日12:37:36 myserver[14611]:在System.Runtime.CompilerServices.TaskWaiter.HandleNonSuccessAndDebuggerNotification(任务任务)
5月17日12:37:36 myserver[14611]:在MongoDB.Driver.MongoCollectionImpl`1.d_u91`1.MoveNext()
5月17日12:37:36 myserver[14611]:---引发异常的前一个位置的堆栈结束跟踪---
五月17日12:37:36 myserver[14611]:在System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()上
5月17日12:37:36 myserver[14611]:在System.Runtime.CompilerServices.TaskWaiter.HandleNonSuccessAndDebuggerNotification(任务任务)
5月17日12:37:36 myserver[14611]:在MongoDB.Driver.iasyncursorsourceextensions.d_u5`1.MoveNext()上
5月17日12:37:36 myserver[14611]:---引发异常的前一个位置的堆栈结束跟踪---
五月17日12:37:36 myserver[14611]:在System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()上
5月17日12:37:36 myserver[14611]:在System.Runtime.CompilerServices.TaskWaiter.HandleNonSuccessAndDebuggerNotification(任务任务)
五月17日12:37:36 myserver[14611]:在MYData.UserCollection.d_u2.MoveNext()上
5月17日12:37:36 myserver[14611]:---引发异常的前一个位置的堆栈结束跟踪---
五月17日12:37:36 myserver[14611]:在System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()上
5月17日12:37:36 myserver[14611]:在System.Runtime.CompilerServices.TaskWaiter.HandleNonSuccessAndDebuggerNotification(任务任务)
五月17日12:37:36 myserver[14611]:在MYAPI.Controllers.PostController.d_u8.MoveNext()上
5月17日12:37:36 myserver[14611]:---引发异常的前一个位置的堆栈结束跟踪---
五月17日12:37:36 myserver[14611]:在System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()上
5月17日12:37:36 myserver[14611]:在System.Runtime.CompilerServices.TaskWaiter.HandleNonSuccessAndDebuggerNotification(任务任务)
五月17日12:37:36 myserver[14611]:在System.Runtime.CompilerServices.TaskWaiter`1.GetResult()上
5月17日12:37:36 myserver[14611]:在Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.d_u12.MoveNext()上
5月17日12:37:36 myserver[14611]:---上一个版本的堆栈结束跟踪