N
Noman Ali
Hi,
We are facing a strange problem in our ASP. NET website. Some times it gives
the following unhandled exception.
Error Message: Exception of type System.Web.HttpUnhandledException was thrown.
Detailed Error Message: System.InvalidOperationException: There has been an
overflow or underflow in GC memory pressure. The possible cause is unbalanced
AddMemoryPressure and RemoveMemoryPressure calls.
at System.MemoryWatcher.AddMemoryPressure(Int64 size)
at System.GC.AddMemoryPressure(Int64 pressure)
at WebApplication1.CFileUtils.ProcessFile(String filename)
at WebApplication1.CBanner.CreateStringTag(String appPath, Int32 width,
Int32 height, String& ext)
at WebApplication1.CAdRotator.DisplayBanners(HtmlTable table, String
position, String queryStr, String[]& displayed)
at WebApplication1.TopBanner.Page_Load(Object sender, EventArgs e)
at System.Web.UI.Control.OnLoad(EventArgs e)
at System.Web.UI.Control.LoadRecursive()
at System.Web.UI.Control.LoadRecursive()
at System.Web.UI.Control.LoadRecursive()
at System.Web.UI.Control.LoadRecursive()
at System.Web.UI.Control.LoadRecursive()
at System.Web.UI.Page.ProcessRequestMain()
I already did some research on it and found that it is caused when you add
and remove unbalanced memory pressure on GC. But we are not doing that. The
exception comes during peak hours of our site and it comes randomly normally
after 12-14 hours daily and after that we needs to restart the asp .net
worker process. The worker process uses around 50% of the system memory
during this abnormal behaviour. The web application heavily uses some
unmanaged COM components for PDF and image manupulation.
What i had done so far, i forefully calls garbage collection after every
hour so that COM components will be garbage collected. I am identifying
memory leaks in the web application but still i think the problem is
different.
Any suggestion, comments or experience will be welcome.
Regards,
Noman Ali
We are facing a strange problem in our ASP. NET website. Some times it gives
the following unhandled exception.
Error Message: Exception of type System.Web.HttpUnhandledException was thrown.
Detailed Error Message: System.InvalidOperationException: There has been an
overflow or underflow in GC memory pressure. The possible cause is unbalanced
AddMemoryPressure and RemoveMemoryPressure calls.
at System.MemoryWatcher.AddMemoryPressure(Int64 size)
at System.GC.AddMemoryPressure(Int64 pressure)
at WebApplication1.CFileUtils.ProcessFile(String filename)
at WebApplication1.CBanner.CreateStringTag(String appPath, Int32 width,
Int32 height, String& ext)
at WebApplication1.CAdRotator.DisplayBanners(HtmlTable table, String
position, String queryStr, String[]& displayed)
at WebApplication1.TopBanner.Page_Load(Object sender, EventArgs e)
at System.Web.UI.Control.OnLoad(EventArgs e)
at System.Web.UI.Control.LoadRecursive()
at System.Web.UI.Control.LoadRecursive()
at System.Web.UI.Control.LoadRecursive()
at System.Web.UI.Control.LoadRecursive()
at System.Web.UI.Control.LoadRecursive()
at System.Web.UI.Page.ProcessRequestMain()
I already did some research on it and found that it is caused when you add
and remove unbalanced memory pressure on GC. But we are not doing that. The
exception comes during peak hours of our site and it comes randomly normally
after 12-14 hours daily and after that we needs to restart the asp .net
worker process. The worker process uses around 50% of the system memory
during this abnormal behaviour. The web application heavily uses some
unmanaged COM components for PDF and image manupulation.
What i had done so far, i forefully calls garbage collection after every
hour so that COM components will be garbage collected. I am identifying
memory leaks in the web application but still i think the problem is
different.
Any suggestion, comments or experience will be welcome.
Regards,
Noman Ali