Details

    • Bug
    • Status: Closed
    • Critical
    • Resolution: Fixed
    • 1.2.11
    • 1.2.14
    • Appenders
    • None

    Description

      Basically what happens is you guys store the SqlCommand between all requests. The problem is, sometimes this prepared statement gets removed from the cache in SqlServer. When this happens all subsequent requests result in an error "Could not find prepared statement with handle -1"

      You could resolve this by checking for that specific error on submitting and if you get it recreate the command and try again, or just recreate and prepare the statement every time.

      This is a pretty major issue.

      Attachments

        Issue Links

          Activity

            I think the AdoNetAppender needs a harsh cleanup and I am on it.

            nachbarslumpi Dominik Psenner added a comment - I think the AdoNetAppender needs a harsh cleanup and I am on it.

            Should be fixed with svn revision 1711736.

            nachbarslumpi Dominik Psenner added a comment - Should be fixed with svn revision 1711736.

            While fixing this I noticed that we might want to refactor this appender further such that it opens and closes database connections in SendBuffer(). If people want that a connection is not actually closed, they can still use connection pools which almost any database driver of today has built in and can be specified in the connection string. This is further backed up by the fact that newer .NET framework versions provide automatic reconnections and this results in the fact that the "ConnectionState" on a connection never reports that the connection is actually broken. This further causes the appender to be unable to detect broken connections while at the same time reporting that queries fail while the actual problem is a lost connection. On top of that the overall logic and householding can be simplified.

            Please discuss!

            nachbarslumpi Dominik Psenner added a comment - While fixing this I noticed that we might want to refactor this appender further such that it opens and closes database connections in SendBuffer(). If people want that a connection is not actually closed, they can still use connection pools which almost any database driver of today has built in and can be specified in the connection string. This is further backed up by the fact that newer .NET framework versions provide automatic reconnections and this results in the fact that the "ConnectionState" on a connection never reports that the connection is actually broken. This further causes the appender to be unable to detect broken connections while at the same time reporting that queries fail while the actual problem is a lost connection. On top of that the overall logic and householding can be simplified. Please discuss!

            People

              nachbarslumpi Dominik Psenner
              kellyelton Kelly Elton
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: