1 つの Web ロールを持つ Azure クラウド プロジェクトがあります。Web ロール エンドポイントは、デプロイのほぼ直後に HTTP 400 - Bad Request を返します。トレース メッセージ ログをチェックインすると、以下の例外が表示されます -
Type : System.InvalidOperationException, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
Message : Custom counters file view is out of memory.
Source : System
Help link :
Data : System.Collections.ListDictionaryInternal
TargetSite : Int32 CalculateMemory(Int32, Int32, Int32 ByRef)
HResult : -2146233079
Stack Trace : at System.Diagnostics.SharedPerformanceCounter.CalculateMemory(Int32 oldOffset, Int32 totalSize, Int32& alignmentAdjustment)
at System.Diagnostics.SharedPerformanceCounter.CreateCategory(CategoryEntry* lastCategoryPointer, Int32 instanceNameHashCode, String instanceName, PerformanceCounterInstanceLifetime lifetime)
at System.Diagnostics.SharedPerformanceCounter.GetCounter(String counterName, String instanceName, Boolean enableReuse, PerformanceCounterInstanceLifetime lifetime)
at System.Diagnostics.SharedPerformanceCounter..ctor(String catName, String counterName, String instanceName, PerformanceCounterInstanceLifetime lifetime)
at System.Diagnostics.PerformanceCounter.InitializeImpl()
at System.Diagnostics.PerformanceCounter..ctor(String categoryName, String counterName, String instanceName, Boolean readOnly)
この問題は、.NET がパフォーマンス カウンターに割り当てることができるメモリ量の上限に達したときに発生するようです。
そこで、Web.config の以下のエントリを使用してメモリ割り当てを増やしてみました -
<configuration>
<system.diagnostics>
<performanceCounters filemappingsize="33554432" />
</system.diagnostics>
</configuration>
しかし、これでも、私はまだ問題を抱えています。誰かが問題を解決するための指針を教えてもらえますか?
ありがとう!