A web application of mine developed using C# + MS SQL runs fine normally.
However when I stress test it with a load testing software (using about 60
simultaneous users) some instances start erroring out. I see two different
errors. One is a "Object reference not set to an instance of an object."
error, which appears to always contain the same information, and the other
is a "There is no row at position X.", where X is a number.
Is this an indication of bad coding or is this just a normal consequence of
overloading a web application? How can the above two errors happen when the
server is being overloaded when normally the application works fine?
ERROR #1:
Server Error in '/' Application.
----------------------------------------------------------------------------
----
Object reference not set to an instance of an object.
Description: An unhandled exception occurred during the execution of the
current web request. Please review the stack trace for more information
about the error and where it originated in the code.
Exception Details: System.NullRefe renceException: Object reference not set
to an instance of an object.
Source Error:
An unhandled exception was generated during the execution of the current web
request. Information regarding the origin and location of the exception can
be identified using the exception stack trace below.
Stack Trace:
[NullReferenceEx ception: Object reference not set to an instance of an
object.]
System.Data.Dat aView.GetRecord (Int32 recordIndex) +22
System.Data.Dat aView.IsOrigina lVersion(Int32 index) +9
System.Data.Dat aRowView.GetCol umnValue(DataCo lumn column) +23
System.Data.Dat aColumnProperty Descriptor.GetV alue(Object component) +25
System.Web.UI.D ataBinder.GetPr opertyValue(Obj ect container, String
propName) +72
System.Web.UI.D ataBinder.GetPr opertyValue(Obj ect container, String
propName, String format) +11
System.Web.UI.W ebControls.List Control.OnDataB inding(EventArg s e) +403
System.Web.UI.C ontrol.DataBind () +26
FN.advancedsear ch.populateList controls()
FN.advancedsear ch.Page_Load(Ob ject sender, EventArgs e)
System.Web.UI.C ontrol.OnLoad(E ventArgs e) +67
System.Web.UI.C ontrol.LoadRecu rsive() +35
System.Web.UI.P age.ProcessRequ estMain() +750
ERROR #2:
Server Error in '/' Application.
----------------------------------------------------------------------------
----
There is no row at position 5.
Description: An unhandled exception occurred during the execution of the
current web request. Please review the stack trace for more information
about the error and where it originated in the code.
Exception Details: System.IndexOut OfRangeExceptio n: There is no row at
position 5.
Source Error:
An unhandled exception was generated during the execution of the current web
request. Information regarding the origin and location of the exception can
be identified using the exception stack trace below.
Stack Trace:
[IndexOutOfRange Exception: There is no row at position 5.]
System.Data.Dat aView.GetRecord (Int32 recordIndex) +60
System.Data.Dat aView.IsOrigina lVersion(Int32 index) +9
System.Data.Dat aRowView.GetCol umnValue(DataCo lumn column) +23
System.Data.Dat aColumnProperty Descriptor.GetV alue(Object component) +25
System.Web.UI.D ataBinder.GetPr opertyValue(Obj ect container, String
propName) +72
System.Web.UI.D ataBinder.GetPr opertyValue(Obj ect container, String
propName, String format) +11
System.Web.UI.W ebControls.List Control.OnDataB inding(EventArg s e) +403
System.Web.UI.C ontrol.DataBind () +26
FN.advancedsear ch.populateList controls()
FN.advancedsear ch.Page_Load(Ob ject sender, EventArgs e)
System.Web.UI.C ontrol.OnLoad(E ventArgs e) +67
System.Web.UI.C ontrol.LoadRecu rsive() +35
System.Web.UI.P age.ProcessRequ estMain() +750
However when I stress test it with a load testing software (using about 60
simultaneous users) some instances start erroring out. I see two different
errors. One is a "Object reference not set to an instance of an object."
error, which appears to always contain the same information, and the other
is a "There is no row at position X.", where X is a number.
Is this an indication of bad coding or is this just a normal consequence of
overloading a web application? How can the above two errors happen when the
server is being overloaded when normally the application works fine?
ERROR #1:
Server Error in '/' Application.
----------------------------------------------------------------------------
----
Object reference not set to an instance of an object.
Description: An unhandled exception occurred during the execution of the
current web request. Please review the stack trace for more information
about the error and where it originated in the code.
Exception Details: System.NullRefe renceException: Object reference not set
to an instance of an object.
Source Error:
An unhandled exception was generated during the execution of the current web
request. Information regarding the origin and location of the exception can
be identified using the exception stack trace below.
Stack Trace:
[NullReferenceEx ception: Object reference not set to an instance of an
object.]
System.Data.Dat aView.GetRecord (Int32 recordIndex) +22
System.Data.Dat aView.IsOrigina lVersion(Int32 index) +9
System.Data.Dat aRowView.GetCol umnValue(DataCo lumn column) +23
System.Data.Dat aColumnProperty Descriptor.GetV alue(Object component) +25
System.Web.UI.D ataBinder.GetPr opertyValue(Obj ect container, String
propName) +72
System.Web.UI.D ataBinder.GetPr opertyValue(Obj ect container, String
propName, String format) +11
System.Web.UI.W ebControls.List Control.OnDataB inding(EventArg s e) +403
System.Web.UI.C ontrol.DataBind () +26
FN.advancedsear ch.populateList controls()
FN.advancedsear ch.Page_Load(Ob ject sender, EventArgs e)
System.Web.UI.C ontrol.OnLoad(E ventArgs e) +67
System.Web.UI.C ontrol.LoadRecu rsive() +35
System.Web.UI.P age.ProcessRequ estMain() +750
ERROR #2:
Server Error in '/' Application.
----------------------------------------------------------------------------
----
There is no row at position 5.
Description: An unhandled exception occurred during the execution of the
current web request. Please review the stack trace for more information
about the error and where it originated in the code.
Exception Details: System.IndexOut OfRangeExceptio n: There is no row at
position 5.
Source Error:
An unhandled exception was generated during the execution of the current web
request. Information regarding the origin and location of the exception can
be identified using the exception stack trace below.
Stack Trace:
[IndexOutOfRange Exception: There is no row at position 5.]
System.Data.Dat aView.GetRecord (Int32 recordIndex) +60
System.Data.Dat aView.IsOrigina lVersion(Int32 index) +9
System.Data.Dat aRowView.GetCol umnValue(DataCo lumn column) +23
System.Data.Dat aColumnProperty Descriptor.GetV alue(Object component) +25
System.Web.UI.D ataBinder.GetPr opertyValue(Obj ect container, String
propName) +72
System.Web.UI.D ataBinder.GetPr opertyValue(Obj ect container, String
propName, String format) +11
System.Web.UI.W ebControls.List Control.OnDataB inding(EventArg s e) +403
System.Web.UI.C ontrol.DataBind () +26
FN.advancedsear ch.populateList controls()
FN.advancedsear ch.Page_Load(Ob ject sender, EventArgs e)
System.Web.UI.C ontrol.OnLoad(E ventArgs e) +67
System.Web.UI.C ontrol.LoadRecu rsive() +35
System.Web.UI.P age.ProcessRequ estMain() +750
Comment