What is causing Resourse-Exhaustion-Detector Event in asp.net app

I have a simple logging application which brings down my web service and SQL Server after running for between 24 and 48 hours. While running, Task Manager does not show any shortage of resources. Here is the code (vb.net)
    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
        Try
            Dim context1 As HttpContext = HttpContext.Current
            Dim strAuc As String = context1.Request("auc")
            Dim strUID As String = context1.Request("uid")
            Dim strURL As String = context1.Request("url")
            Dim strSQL As String = "insert into tblurl(datetime,auction_id_64,user_id_64,url) VALUES(getdate()," & strAuc & "," & strUID & ",'" & strURL & "')"
            Dim cn As New SqlConnection
            cn.ConnectionString = "Server=n.n.n.n;Database=somedb;User Id=sa;Password=xxxxx;Min Pool Size=0;Max Pool Size =1000;"
            cn.Open()
            Dim cmd As New SqlCommand
            cmd.Connection = cn
            cmd.CommandType = CommandType.Text
            cmd.CommandText = strSQL
            Try
                cmd.ExecuteNonQuery()
            Catch
            End Try
            cn.Close()
            cn.Dispose()
            cn = Nothing
            Response.Redirect("blank.gif")

        Catch
        End Try
    End Sub
jking1234Asked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Dan McFaddenSystems EngineerCommented:
Are there any errors or warnings in the Event Logs?
0
jking1234Author Commented:
Yes,
A warning:
Windows successfully diagnosed a low virtual memory condition. The following programs consumed the most virtual memory: sqlservr.exe (3416) consumed 11239366656 bytes, w3wp.exe (4192) consumed 174723072 bytes, and Ssms.exe (2520) consumed 108425216 bytes.

and an error
Unable to create the error log file. Make sure that the error logging directory is correct.
0
jking1234Author Commented:
The last error before failing was:
Application pool 'DefaultAppPool' is being automatically disabled due to a series of failures in the process(es) serving that application pool.
0
Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

Dan McFaddenSystems EngineerCommented:
More questions:

1. How much RAM does the server have?
2. How is the pagefile configured?
3. Have you tweaked the memory configuration of the SQL instance?  Is SQL Server configured to use all available RAM?

For #2:  http://social.technet.microsoft.com/wiki/contents/articles/13383.best-practices-for-page-file-and-minimum-drive-size-for-os-partition-on-windows-servers.aspx

For #3:  using SQL Server Management Studio, connect to the SQL instance.  Then, in the object explorer, right-click on the server and select properties.  Select the Memory option.  What is configured for "Maximum server memory"?
0
jking1234Author Commented:
Answers:
1.   12Gb
2.   Pagefile was not configured (I have set it to 30Gb on C: and 100Gb on D:
3.   Maximum Server memory was 2147483647Mb, (I have set it to 10,000Mb)

I have now rebooted the server and will see how it goes
0
Dan McFaddenSystems EngineerCommented:
Sounds good.

I would recommend removing the swap file on D:.  There is absolutely no reason for a 100GB swap file.  I use the rule of 1.5 x RAM for a pagefile which I manually configure.  I'm not a fan of "system managed" pagefiles.

Also if you have the SQL data and logs files on D:, you might put too much stress on the volume which will cause overall system slowdown.

I also thin that 8GB for SQL is enough.  The reason being is that the box is also running IIS and you don't want to squeeze system resources too much on it.  Plus you have to leave a little room for normal OS operations.

Question:  do you have the AppPool(s) set to recycle?

Hope this helps.

Dan
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
jking1234Author Commented:
AppPool(s) recycling is left to default Regular Time Interval (minutes) 1740
0
jking1234Author Commented:
Very helpful, thanks very much
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Web Applications

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.