473,386 Members | 1,706 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

Need to debug/trace ADO's Fill method

I have a website where cataloge pages are populated by calling a stored
procedure on sql server. I use the sql data adapter's fill method to call
this stored procedure and fill the dataset. about 6 to 15 times a day the
server hangs and times out when this fill method is called. The SP is
simple and uses very little resources (as tested using client statistics in
query analyzer). Here's data from my error log which includes the
exception:

Log ID: 722
Mod: da_Catalog,
Proc: Get_ProductListingGrid,
ID=143,
CustID=0
ex.Message=Timeout expired. The timeout period elapsed prior to completion
of the operation or the server is not responding.
ex.StackTrace= at
System.Data.SqlClient.SqlCommand.ExecuteReader(Com mandBehavior cmdBehavior,
RunBehavior runBehavior, Boolean returnStream)
at System.Data.SqlClient.SqlCommand.ExecuteReader(Com mandBehavior
behavior)
at
System.Data.SqlClient.SqlCommand.System.Data.IDbCo mmand.ExecuteReader(CommandBehavior
behavior)
at System.Data.Common.DbDataAdapter.FillFromCommand(O bject data, Int32
startRecord, Int32 maxRecords, String srcTable, IDbCommand command,
CommandBehavior behavior)
at System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, Int32
startRecord, Int32 maxRecords, String srcTable, IDbCommand command,
CommandBehavior behavior)
at System.Data.Common.DbDataAdapter.Fill(DataSet dataSet)
at Charmpix.da_Catalog.Get_ProductListingGrid(Int32 ID, Int32 CustID)
Time Stamp: 10/19/2004 11:18:37 PM
The application is being hosted in a shared environment, but the ISP is very
good and has extremely knowledgeable technicians helping on the backend.
They cant find any issues with their servers and are asking for more
information from me.

Is there anyway I can log a stack trace starting from the point where Fill
Method is called so we can see exactly where the code is hanging? We would
like to know if its hanging on IIS where the fill method is, or is it
hanging on the sql server then the SP is trying to execute.

Can anyone help me trouble shoot this?

Thanks!

--
mo*******@nospam.com
Nov 21 '05 #1
5 2271
3 things I can think of:

1) Some sort of deadlocking - do you have transactions or something else
that might cause a deadlock
2) Need to increase command timeout as the query cannot complete in the time
specified
3) The SQL Server is busy doing other work (perhaps from someone else's app)
and just doesn't have enough resources to complete your request.

I don't think you are going to be able to get anywhere else as far as
debugging further into this - fill is a framework method, you cannot debug
into it.

"moondaddy" <mo*******@nospam.com> wrote in message
news:en**************@TK2MSFTNGP14.phx.gbl...
I have a website where cataloge pages are populated by calling a stored
procedure on sql server. I use the sql data adapter's fill method to call
this stored procedure and fill the dataset. about 6 to 15 times a day the
server hangs and times out when this fill method is called. The SP is
simple and uses very little resources (as tested using client statistics in query analyzer). Here's data from my error log which includes the
exception:

Log ID: 722
Mod: da_Catalog,
Proc: Get_ProductListingGrid,
ID=143,
CustID=0
ex.Message=Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding.
ex.StackTrace= at
System.Data.SqlClient.SqlCommand.ExecuteReader(Com mandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream)
at System.Data.SqlClient.SqlCommand.ExecuteReader(Com mandBehavior
behavior)
at
System.Data.SqlClient.SqlCommand.System.Data.IDbCo mmand.ExecuteReader(Comman
dBehavior behavior)
at System.Data.Common.DbDataAdapter.FillFromCommand(O bject data, Int32
startRecord, Int32 maxRecords, String srcTable, IDbCommand command,
CommandBehavior behavior)
at System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, Int32
startRecord, Int32 maxRecords, String srcTable, IDbCommand command,
CommandBehavior behavior)
at System.Data.Common.DbDataAdapter.Fill(DataSet dataSet)
at Charmpix.da_Catalog.Get_ProductListingGrid(Int32 ID, Int32 CustID)
Time Stamp: 10/19/2004 11:18:37 PM
The application is being hosted in a shared environment, but the ISP is very good and has extremely knowledgeable technicians helping on the backend.
They cant find any issues with their servers and are asking for more
information from me.

Is there anyway I can log a stack trace starting from the point where Fill
Method is called so we can see exactly where the code is hanging? We would like to know if its hanging on IIS where the fill method is, or is it
hanging on the sql server then the SP is trying to execute.

Can anyone help me trouble shoot this?

Thanks!

--
mo*******@nospam.com

Nov 21 '05 #2
Hi,

In addition to Marina's comments Here is a link on How to debug a stored
procedure.

http://support.microsoft.com/default...b;en-us;316549

Ken
------------------------
"moondaddy" <mo*******@nospam.com> wrote in message
news:en**************@TK2MSFTNGP14.phx.gbl...
I have a website where cataloge pages are populated by calling a stored
procedure on sql server. I use the sql data adapter's fill method to call
this stored procedure and fill the dataset. about 6 to 15 times a day the
server hangs and times out when this fill method is called. The SP is
simple and uses very little resources (as tested using client statistics in
query analyzer). Here's data from my error log which includes the
exception:

Log ID: 722
Mod: da_Catalog,
Proc: Get_ProductListingGrid,
ID=143,
CustID=0
ex.Message=Timeout expired. The timeout period elapsed prior to completion
of the operation or the server is not responding.
ex.StackTrace= at
System.Data.SqlClient.SqlCommand.ExecuteReader(Com mandBehavior cmdBehavior,
RunBehavior runBehavior, Boolean returnStream)
at System.Data.SqlClient.SqlCommand.ExecuteReader(Com mandBehavior
behavior)
at
System.Data.SqlClient.SqlCommand.System.Data.IDbCo mmand.ExecuteReader(CommandBehavior
behavior)
at System.Data.Common.DbDataAdapter.FillFromCommand(O bject data, Int32
startRecord, Int32 maxRecords, String srcTable, IDbCommand command,
CommandBehavior behavior)
at System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, Int32
startRecord, Int32 maxRecords, String srcTable, IDbCommand command,
CommandBehavior behavior)
at System.Data.Common.DbDataAdapter.Fill(DataSet dataSet)
at Charmpix.da_Catalog.Get_ProductListingGrid(Int32 ID, Int32 CustID)
Time Stamp: 10/19/2004 11:18:37 PM
The application is being hosted in a shared environment, but the ISP is very
good and has extremely knowledgeable technicians helping on the backend.
They cant find any issues with their servers and are asking for more
information from me.

Is there anyway I can log a stack trace starting from the point where Fill
Method is called so we can see exactly where the code is hanging? We would
like to know if its hanging on IIS where the fill method is, or is it
hanging on the sql server then the SP is trying to execute.

Can anyone help me trouble shoot this?

Thanks!

--
mo*******@nospam.com

Nov 21 '05 #3
Thanks to both of your replies and here's my response.
1) deadlock is not likely as I'm not using temp tables in the SP and we're
not performing transactions. Just simple a select statement.

2) The command timeout is already pretty long. The fact that its timing out
means there's already an issue happening. Also, by waiting so long to
timeout (refering to the current timeout period) the user browsing our site
will have become disgruntled and probably gone elsewhere. Therefore, its
really important to resolve the real problem.

3) SQL server could be real busy, but once again, this SP is very simple and
executes very quickly. Its possible the server is too busy, but the ISP has
been monitoring it and doesn't see anything that suggests its too busy.

FYI: the ISP is MaximumASP and I think you will find them a very credible
service provider that's extremely competent on the back end.

As for debugging the stored procedure:
A) I could hit this SP 200 times and it would fire perfectly, then later on
in the day it will hang a few times with in a span of a few minutes or few
hours. Its very difficult to catch.
B) The server's I'm using are remotely hosted at MaximumASP and from what I
know, debugging would be difficult or impossible to do in that scenario. I
don't have this problem on my local dev network.

Any more feedback would be greatly appreciated.

Thanks Again!

--
mo*******@nospam.com
"Ken Tucker [MVP]" <vb***@bellsouth.net> wrote in message
news:%2****************@tk2msftngp13.phx.gbl...
Hi,

In addition to Marina's comments Here is a link on How to debug a
stored
procedure.

http://support.microsoft.com/default...b;en-us;316549

Ken
------------------------
"moondaddy" <mo*******@nospam.com> wrote in message
news:en**************@TK2MSFTNGP14.phx.gbl...
I have a website where cataloge pages are populated by calling a stored
procedure on sql server. I use the sql data adapter's fill method to call
this stored procedure and fill the dataset. about 6 to 15 times a day the
server hangs and times out when this fill method is called. The SP is
simple and uses very little resources (as tested using client statistics
in
query analyzer). Here's data from my error log which includes the
exception:

Log ID: 722
Mod: da_Catalog,
Proc: Get_ProductListingGrid,
ID=143,
CustID=0
ex.Message=Timeout expired. The timeout period elapsed prior to
completion
of the operation or the server is not responding.
ex.StackTrace= at
System.Data.SqlClient.SqlCommand.ExecuteReader(Com mandBehavior
cmdBehavior,
RunBehavior runBehavior, Boolean returnStream)
at System.Data.SqlClient.SqlCommand.ExecuteReader(Com mandBehavior
behavior)
at
System.Data.SqlClient.SqlCommand.System.Data.IDbCo mmand.ExecuteReader(CommandBehavior
behavior)
at System.Data.Common.DbDataAdapter.FillFromCommand(O bject data, Int32
startRecord, Int32 maxRecords, String srcTable, IDbCommand command,
CommandBehavior behavior)
at System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, Int32
startRecord, Int32 maxRecords, String srcTable, IDbCommand command,
CommandBehavior behavior)
at System.Data.Common.DbDataAdapter.Fill(DataSet dataSet)
at Charmpix.da_Catalog.Get_ProductListingGrid(Int32 ID, Int32 CustID)
Time Stamp: 10/19/2004 11:18:37 PM
The application is being hosted in a shared environment, but the ISP is
very
good and has extremely knowledgeable technicians helping on the backend.
They cant find any issues with their servers and are asking for more
information from me.

Is there anyway I can log a stack trace starting from the point where Fill
Method is called so we can see exactly where the code is hanging? We
would
like to know if its hanging on IIS where the fill method is, or is it
hanging on the sql server then the SP is trying to execute.

Can anyone help me trouble shoot this?

Thanks!

--
mo*******@nospam.com

Nov 21 '05 #4
Regardless of how simple it is, if the sql server is being completely
consumed by some other long running query, then it won't be able to execute
the simplest of queries.

I agree that it is unlikely that you will be able to sucessfully debug
anything on a server being hosted elsewhere.

Perhaps you could ask your ISP to move the database you are using to another
SQL Server to see if the problem persists.

"moondaddy" <mo*******@nospam.com> wrote in message
news:Oe**************@TK2MSFTNGP15.phx.gbl...
Thanks to both of your replies and here's my response.
1) deadlock is not likely as I'm not using temp tables in the SP and we're
not performing transactions. Just simple a select statement.

2) The command timeout is already pretty long. The fact that its timing out means there's already an issue happening. Also, by waiting so long to
timeout (refering to the current timeout period) the user browsing our site will have become disgruntled and probably gone elsewhere. Therefore, its
really important to resolve the real problem.

3) SQL server could be real busy, but once again, this SP is very simple and executes very quickly. Its possible the server is too busy, but the ISP has been monitoring it and doesn't see anything that suggests its too busy.

FYI: the ISP is MaximumASP and I think you will find them a very credible
service provider that's extremely competent on the back end.

As for debugging the stored procedure:
A) I could hit this SP 200 times and it would fire perfectly, then later on in the day it will hang a few times with in a span of a few minutes or few
hours. Its very difficult to catch.
B) The server's I'm using are remotely hosted at MaximumASP and from what I know, debugging would be difficult or impossible to do in that scenario. I don't have this problem on my local dev network.

Any more feedback would be greatly appreciated.

Thanks Again!

--
mo*******@nospam.com
"Ken Tucker [MVP]" <vb***@bellsouth.net> wrote in message
news:%2****************@tk2msftngp13.phx.gbl...
Hi,

In addition to Marina's comments Here is a link on How to debug a
stored
procedure.

http://support.microsoft.com/default...b;en-us;316549

Ken
------------------------
"moondaddy" <mo*******@nospam.com> wrote in message
news:en**************@TK2MSFTNGP14.phx.gbl...
I have a website where cataloge pages are populated by calling a stored
procedure on sql server. I use the sql data adapter's fill method to call this stored procedure and fill the dataset. about 6 to 15 times a day the server hangs and times out when this fill method is called. The SP is
simple and uses very little resources (as tested using client statistics
in
query analyzer). Here's data from my error log which includes the
exception:

Log ID: 722
Mod: da_Catalog,
Proc: Get_ProductListingGrid,
ID=143,
CustID=0
ex.Message=Timeout expired. The timeout period elapsed prior to
completion
of the operation or the server is not responding.
ex.StackTrace= at
System.Data.SqlClient.SqlCommand.ExecuteReader(Com mandBehavior
cmdBehavior,
RunBehavior runBehavior, Boolean returnStream)
at System.Data.SqlClient.SqlCommand.ExecuteReader(Com mandBehavior
behavior)
at
System.Data.SqlClient.SqlCommand.System.Data.IDbCo mmand.ExecuteReader(Comman
dBehavior behavior)
at System.Data.Common.DbDataAdapter.FillFromCommand(O bject data, Int32
startRecord, Int32 maxRecords, String srcTable, IDbCommand command,
CommandBehavior behavior)
at System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, Int32
startRecord, Int32 maxRecords, String srcTable, IDbCommand command,
CommandBehavior behavior)
at System.Data.Common.DbDataAdapter.Fill(DataSet dataSet)
at Charmpix.da_Catalog.Get_ProductListingGrid(Int32 ID, Int32 CustID)
Time Stamp: 10/19/2004 11:18:37 PM
The application is being hosted in a shared environment, but the ISP is
very
good and has extremely knowledgeable technicians helping on the backend.
They cant find any issues with their servers and are asking for more
information from me.

Is there anyway I can log a stack trace starting from the point where Fill Method is called so we can see exactly where the code is hanging? We
would
like to know if its hanging on IIS where the fill method is, or is it
hanging on the sql server then the SP is trying to execute.

Can anyone help me trouble shoot this?

Thanks!

--
mo*******@nospam.com


Nov 21 '05 #5
Thanks for all the feedback. I already put in a request to move my db to a
different server. Wish me luck...

--
mo*******@nospam.com
"Marina" <so*****@nospam.com> wrote in message
news:Oy**************@TK2MSFTNGP11.phx.gbl...
Regardless of how simple it is, if the sql server is being completely
consumed by some other long running query, then it won't be able to
execute
the simplest of queries.

I agree that it is unlikely that you will be able to sucessfully debug
anything on a server being hosted elsewhere.

Perhaps you could ask your ISP to move the database you are using to
another
SQL Server to see if the problem persists.

"moondaddy" <mo*******@nospam.com> wrote in message
news:Oe**************@TK2MSFTNGP15.phx.gbl...
Thanks to both of your replies and here's my response.
1) deadlock is not likely as I'm not using temp tables in the SP and
we're
not performing transactions. Just simple a select statement.

2) The command timeout is already pretty long. The fact that its timing

out
means there's already an issue happening. Also, by waiting so long to
timeout (refering to the current timeout period) the user browsing our

site
will have become disgruntled and probably gone elsewhere. Therefore, its
really important to resolve the real problem.

3) SQL server could be real busy, but once again, this SP is very simple

and
executes very quickly. Its possible the server is too busy, but the ISP

has
been monitoring it and doesn't see anything that suggests its too busy.

FYI: the ISP is MaximumASP and I think you will find them a very
credible
service provider that's extremely competent on the back end.

As for debugging the stored procedure:
A) I could hit this SP 200 times and it would fire perfectly, then later

on
in the day it will hang a few times with in a span of a few minutes or
few
hours. Its very difficult to catch.
B) The server's I'm using are remotely hosted at MaximumASP and from
what

I
know, debugging would be difficult or impossible to do in that scenario.

I
don't have this problem on my local dev network.

Any more feedback would be greatly appreciated.

Thanks Again!

--
mo*******@nospam.com
"Ken Tucker [MVP]" <vb***@bellsouth.net> wrote in message
news:%2****************@tk2msftngp13.phx.gbl...
> Hi,
>
> In addition to Marina's comments Here is a link on How to debug a
> stored
> procedure.
>
> http://support.microsoft.com/default...b;en-us;316549
>
> Ken
> ------------------------
> "moondaddy" <mo*******@nospam.com> wrote in message
> news:en**************@TK2MSFTNGP14.phx.gbl...
> I have a website where cataloge pages are populated by calling a stored
> procedure on sql server. I use the sql data adapter's fill method to call > this stored procedure and fill the dataset. about 6 to 15 times a day the > server hangs and times out when this fill method is called. The SP is
> simple and uses very little resources (as tested using client
> statistics
> in
> query analyzer). Here's data from my error log which includes the
> exception:
>
> Log ID: 722
> Mod: da_Catalog,
> Proc: Get_ProductListingGrid,
> ID=143,
> CustID=0
> ex.Message=Timeout expired. The timeout period elapsed prior to
> completion
> of the operation or the server is not responding.
> ex.StackTrace= at
> System.Data.SqlClient.SqlCommand.ExecuteReader(Com mandBehavior
> cmdBehavior,
> RunBehavior runBehavior, Boolean returnStream)
> at System.Data.SqlClient.SqlCommand.ExecuteReader(Com mandBehavior
> behavior)
> at
> System.Data.SqlClient.SqlCommand.System.Data.IDbCo mmand.ExecuteReader(Comman
dBehavior > behavior)
> at System.Data.Common.DbDataAdapter.FillFromCommand(O bject data,
> Int32
> startRecord, Int32 maxRecords, String srcTable, IDbCommand command,
> CommandBehavior behavior)
> at System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, Int32
> startRecord, Int32 maxRecords, String srcTable, IDbCommand command,
> CommandBehavior behavior)
> at System.Data.Common.DbDataAdapter.Fill(DataSet dataSet)
> at Charmpix.da_Catalog.Get_ProductListingGrid(Int32 ID, Int32 CustID)
> Time Stamp: 10/19/2004 11:18:37 PM
>
>
> The application is being hosted in a shared environment, but the ISP is
> very
> good and has extremely knowledgeable technicians helping on the
> backend.
> They cant find any issues with their servers and are asking for more
> information from me.
>
> Is there anyway I can log a stack trace starting from the point where Fill > Method is called so we can see exactly where the code is hanging? We
> would
> like to know if its hanging on IIS where the fill method is, or is it
> hanging on the sql server then the SP is trying to execute.
>
> Can anyone help me trouble shoot this?
>
> Thanks!
>
>
>
> --
> mo*******@nospam.com
>
>
>



Nov 21 '05 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: JingleBEV | last post by:
Hi all, I don't seem to get this going, possibly lacking the knowledge of dao recordset. I try to fill this Datagrid with the DAO.recordset, but it keeps giving me the error 13 - datatype...
5
by: David Krmpotic | last post by:
it's me again.. with quite interesting discovery :) I was tracing an error for 3 hours instead of 3 minutes because of this surprise. Recently I'm compiling this project in RELEASE with Debug...
4
by: A.M | last post by:
Hi, If I use System.Diagnostics.Debug.WriteLine in a asp.net application, where does the output go? Is there any trace monitor application thar shows me the trace output? Thanks, Allan
1
by: nita | last post by:
Hi, I am trying to Accessing an ADO Recordset or Record from ADO.NET. myDA.Fill(myDS, adoRS, "Employee") the above statement generates the build error -...
7
by: Alan Pretre | last post by:
I have an application installed at a customer site that has been getting a general network error for a couple of years. I was hoping that .NET 2.0 would clear it up, but unfortunately it didn't. ...
5
by: Lyle Fairfield | last post by:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dndotnet/html/adonetprogmsdn.asp The Design of ADO To better understand the model and design of ADO.NET, it is helpful to...
5
by: Mr. SweatyFinger | last post by:
WHY CAN'T THE CLOWN -HOLES WHO WROTE ASP.NET PROVIDE AN ERROR LINE NUMBER??? HONEST TO SH@THOLE PETE Server Error in '/New Folder (7)' Application....
0
by: shamirza | last post by:
ADO.Net Making the Connection: Accessing Your Database using ADO.NET Data Access Namespaces Within the .NET framework class library (FCL) version 1.1, there are five third-level namespaces that...
2
by: neocarl | last post by:
Hi, I am fairly new to VB.net and ADO.net. I am having a problem when Connecting the database to to website i am creating with vb.net. Basically The final step I did was create the datagrid, so...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.