2017-08-04 98 views
0

我們目前在IIS上有一個網站,外部可以繼續進行付款,付款通過API到第三方,付款可以在那裏看到。我們還有一個與該站點不同的服務器上的數據庫。異常'System.OutOfMemoryException'被引發

當付款試圖進入時,我們一直在收到一個錯誤「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 

回答

0

這是一個常見的錯誤時,應用程序不正確地使用服務器資源。搜索代碼中的內存泄漏以及可能影響性能的其他不良做法。同時,您可以每天多次回收應用程序池,它比重新啓動IIS過程更好,並且給客戶端帶來更少的麻煩。

您可以結算此link瞭解更多信息