HandleURL stops working

I have an app running on the cloud that gathers and records information from a URL header using HandleURL. Unfortunately, a couple times a day I have to restart the web app to get the HandleURL to work again. The app doesn’t crash because I can still get to the default web page and our admin page. Nothing is showing up in the error logs to indicate that there is a problem either.

Here is the code for the HandleURL:

  dim AnErr as String = "Error Code Dx160311090305"
  dim AnErrDB as String
    if Request.QueryString <> "" then
      dim useragent as string = request.GetRequestHeader("User-Agent")
      dim pathparts() as string = split(request.Path,"/")
      if request.path = "" then
        // If the browser has the word "Monzilla" in the user-agent header, process header Request
        if instr(useragent,"Mozilla")>0 then
          dim strQueryString as String
          dim strQuerySplit(-1) as String
          strQueryString = Request.QueryString
          //check to see if there is something in the QueryString
          if strQueryString = "" then
            strSuccess = "NO"
            //split query string into properties
            strQuerySplit = strQueryString.Split("&")
            strAppVer = strQuerySplit(0)
            strAppOS = strQuerySplit(1)
            strAppOrg = strQuerySplit(2)
            strAppBR = strQuerySplit(3)
            strAppUser = strQuerySplit(4)
            strAppDir = strQuerySplit(5)
            strAppTitle = strQuerySplit(6)
            strAppBudget = strQuerySplit(7)
            strAppPayroll = strQuerySplit(8)
            strAppBackupLast = strQuerySplit(9)
            strAppPayrollLast = strQuerySplit(10)
            strAppTitle = ReplaceAll(strAppTitle,"%", " ")
            strAppDir = ReplaceAll(strAppDir, "!", "\")
            strAppTitle = ReplaceAll(strAppTitle, "*", "#")
            //run save record method
          end if
          //return proper result based on success or failure
          if strSuccess = "YES" then
            request.print "<html><body><h1>" + "SUCCESS " + str(dtNow) + "<h1></body></html>"
            request.print "<html><body><h1>" + "FAILURE" + "<h1></body></html>"
          end if
          request.Status = 200
          return true
        end if
      end if
    end if
  Catch e As NilObjectException
    MsgBox "Nil Object " + " : - " + AnErr
    Logit e.Message, AnErr
  Catch e As OutOfBoundsException
    MsgBox "Out of Bounds " + " : - " + AnErr
    Logit e.Message, AnErr
  Catch e As TypeMismatchException
    MsgBox "Type Mismatch " + " : - " + AnErr
    Logit e.Message, AnErr
  Catch e As RuntimeException
    MsgBox "Run Time Exception " + " : - " + AnErr
    Logit e.Message, AnErr
  end try

Does SaveRecord make a new database connection every time it runs? If not, one request getting locked up could cause subsequent ones to hang…