抛出了'System.OutOfMemoryException'异常

时间:2017-08-04 00:49:37

标签: exception iis server

我们目前在IIS上有一个网站,外面可以继续付款,付款通过API传递给第三方,并且可以在那里看到付款。我们还有一个与站点不同的服务器上的数据库。

我们收到了一个错误“类型'System.OutOfMemoryException'的异常被抛出”当付款试图进入时它似乎在我们不做任何其他事情而不是登录到服务器并且有时重启服务器。例如,当客户尝试在线进行交易时,他们有时会收到此错误。如果他们稍后再试,那么它可以顺利通过。

是否有人熟悉此错误并知道在哪里查看或开始?

谢谢

Exception of type 'System.OutOfMemoryException' was thrown. 
  Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. 

 Exception Details: System.OutOfMemoryException: Exception of type 'System.OutOfMemoryException' was thrown.

Source Error: 


 An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.  

Stack Trace: 



[OutOfMemoryException: Exception of type 'System.OutOfMemoryException' was thrown.]
  System.Runtime.CompilerServices.RuntimeHelpers._CompileMethod(IRuntimeMethodInfo method) +0
   System.Reflection.Emit.DynamicMethod.CreateDelegate(Type delegateType, Object target) +41
   System.Linq.Expressions.Expression`1.Compile() +187
   System.Data.Common.Internal.Materialization.Translator.Compile(Expression body) +154

[TargetInvocationException: Exception has been thrown by the target of an invocation.]
   System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor) +0
   System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments) +76
   System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) +211
   System.Reflection.MethodBase.Invoke(Object obj, Object[] parameters) +35
   System.Data.Common.Internal.Materialization.Translator.Compile(Type resultType, Expression body) +237
   System.Data.Common.Internal.Materialization.ReplacementExpressionVisitor.Visit(Expression expression) +222
   System.Linq.Expressions.EntityExpressionVisitor.VisitExpressionList(ReadOnlyCollection`1 original) +155
   System.Linq.Expressions.E

1 个答案:

答案 0 :(得分:0)

当应用程序未正确使用服务器资源时,这是一个常见错误。搜索代码中的内存泄漏以及可能影响性能的其他不良做法。与此同时,您可以每天多次回收应用程序池,这比重新启动IIS进程并减少客户端麻烦更好。

您可以查看此link了解详情