473,467 Members | 1,992 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Severe concurrency issues with .Net 2.0 and SQL Server 2005

I am not sure if this is the right group to post to but I fugured I'd start
here. Let me know if there is a more appropriate group. I wanted to try the
forums before I wait 3+ hours on the phone to get a suport incident opened.

I am having sever concurrenct issues with a web app running on Server
2003, IIS 6, .Net 2.0 and using SQL Server 2005. The code works fine with a
single user but when I run a jMeter test against it with 3 or more threads
(emulating 3 or more users) I get errors all over the place. Different errors
at different places to make things even more fun. The errors occur when
multiple people are on as well so I don't think it is jMeter.

In general the errors occur when trying to open a SqlConnection or run an
ExceuteReader on a SqlCommand. The errors are usually either
"ExecuteReader requires an open and available Connection. The connection's
current state is connecting" or "invalid attempt to Read when reader is
closed".

This is not a multi threaded app.

The is no indication on the SQL Server side. What requests get through are
being handled fine.

There are no errors in the event viewer or web logs.

Does anyone have any ideas as to what might be happening, where I might
look or what I might try ?
Jul 25 '07 #1
6 1451
Static connection object? That is a common reason for this issue.

--
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA
http://gregorybeamer.spaces.live.com
Co-author: Microsoft Expression Web Bible (upcoming)

************************************************
Think outside the box!
************************************************
"Billiam" <Bi*****@discussions.microsoft.comwrote in message
news:74**********************************@microsof t.com...
I am not sure if this is the right group to post to but I fugured I'd
start
here. Let me know if there is a more appropriate group. I wanted to try
the
forums before I wait 3+ hours on the phone to get a suport incident
opened.

I am having sever concurrenct issues with a web app running on Server
2003, IIS 6, .Net 2.0 and using SQL Server 2005. The code works fine with
a
single user but when I run a jMeter test against it with 3 or more threads
(emulating 3 or more users) I get errors all over the place. Different
errors
at different places to make things even more fun. The errors occur when
multiple people are on as well so I don't think it is jMeter.

In general the errors occur when trying to open a SqlConnection or run an
ExceuteReader on a SqlCommand. The errors are usually either
"ExecuteReader requires an open and available Connection. The connection's
current state is connecting" or "invalid attempt to Read when reader is
closed".

This is not a multi threaded app.

The is no indication on the SQL Server side. What requests get through
are
being handled fine.

There are no errors in the event viewer or web logs.

Does anyone have any ideas as to what might be happening, where I might
look or what I might try ?

Jul 25 '07 #2
* Cowboy (Gregory A. Beamer) wrote, On 25-7-2007 19:42:
Static connection object? That is a common reason for this issue.
That would've been my guess as well. Or a Connection object that's
stored in the Application or Session scope. Both equally bad.

Jesse
Jul 25 '07 #3
I am in fact using a static connection object. I will recode it and see if
that takes care of it.

Thank you for your prompt reply to this.

"Cowboy (Gregory A. Beamer)" wrote:
Static connection object? That is a common reason for this issue.

--
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA
http://gregorybeamer.spaces.live.com
Co-author: Microsoft Expression Web Bible (upcoming)

************************************************
Think outside the box!
************************************************
"Billiam" <Bi*****@discussions.microsoft.comwrote in message
news:74**********************************@microsof t.com...
I am not sure if this is the right group to post to but I fugured I'd
start
here. Let me know if there is a more appropriate group. I wanted to try
the
forums before I wait 3+ hours on the phone to get a suport incident
opened.

I am having sever concurrenct issues with a web app running on Server
2003, IIS 6, .Net 2.0 and using SQL Server 2005. The code works fine with
a
single user but when I run a jMeter test against it with 3 or more threads
(emulating 3 or more users) I get errors all over the place. Different
errors
at different places to make things even more fun. The errors occur when
multiple people are on as well so I don't think it is jMeter.

In general the errors occur when trying to open a SqlConnection or run an
ExceuteReader on a SqlCommand. The errors are usually either
"ExecuteReader requires an open and available Connection. The connection's
current state is connecting" or "invalid attempt to Read when reader is
closed".

This is not a multi threaded app.

The is no indication on the SQL Server side. What requests get through
are
being handled fine.

There are no errors in the event viewer or web logs.

Does anyone have any ideas as to what might be happening, where I might
look or what I might try ?


Jul 25 '07 #4
That was it. Thanks for your help.
Jul 26 '07 #5
Yeah, I had to show a vendor recently that static connection objects are a
bad thing. They were causing a huge number of errors on our site. A static
connection string is fine, but static objects are bad ... in this case.

Session and Application would both be static, so I concur on their
"badness". :-)

--
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA
http://gregorybeamer.spaces.live.com
Co-author: Microsoft Expression Web Bible (upcoming)

************************************************
Think outside the box!
************************************************
"Jesse Houwing" <je***********@nospam-sogeti.nlwrote in message
news:eZ****************@TK2MSFTNGP04.phx.gbl...
>* Cowboy (Gregory A. Beamer) wrote, On 25-7-2007 19:42:
>Static connection object? That is a common reason for this issue.

That would've been my guess as well. Or a Connection object that's stored
in the Application or Session scope. Both equally bad.

Jesse

Jul 27 '07 #6
I had to deal with that recently. A vendor was using static connection
objects for all of his business objects. It creates a real nasty set of side
effects.

You can, technically, get around the closed connection by checking
connection status before loading reader, but the static object will still be
a bottleneck in the application that kills scalability.

--
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA
http://gregorybeamer.spaces.live.com
Co-author: Microsoft Expression Web Bible (upcoming)

************************************************
Think outside the box!
************************************************
"Billiam" <Bi*****@discussions.microsoft.comwrote in message
news:3D**********************************@microsof t.com...
That was it. Thanks for your help.


Jul 27 '07 #7

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

Similar topics

3
by: Robert Schuldenfrei | last post by:
Hi NG, I am looking for an opinion here. I am new to C# and SQL, being an old COBOL hand. I have started into a conversion of an old COBOL ERP system. I have a number of functions working now...
4
by: Robert Schuldenfrei | last post by:
Dear NG, I was about to "improve" concurrency checking with a Timestamp when I discovered that my current code is not working. After about a day of beating my head against the wall, I am...
8
by: Mike Kelly | last post by:
I've chosen to implement the "optimistic concurrency" model in my application. To assist in that, I've added a ROWVERSION (TIMESTAMP) column to my main tables. I read the value of the column in my...
13
by: mfreeman | last post by:
The minimal code (VB.NET 2003) needed to show this problem is shown below. All I do is loop through the records in the table and update them without making any changes. Out of 600 records, about...
4
by: Andrew Robinson | last post by:
I am working on a system system that requires optimistic concurrency within a web app. At first I thought this would be easy. We generate our own entities and dal/service layer but I now see that...
10
by: e_matthes | last post by:
Hello everyone, I have read many threads about concurrency issues, and I think I understand some of the pieces, but not the whole picture. I believe I am like many people using php: ...
4
by: =?Utf-8?B?V2lsc29uIEMuSy4gTmc=?= | last post by:
Hi Experts, I am doing a prototype of providing data access (read, write & search) through Web Service. We observed that the data storing in SQL Server 2005, the memory size is always within...
1
by: =?Utf-8?B?Qi4gQ2hlcm5pY2s=?= | last post by:
(If I'm overlooking anything, please let me know.) First, my only concern is updating single records in a Detailsview using an ObjectDataSource. The target table has a timestamp field. Assume ...
8
by: Roger.Noreply | last post by:
Hi, Sql-Server 2000, 2005. A report fetches a lot of rows using the "WITH (ROWLOCK)" syntax (the sql is generated on the fly by a tool and not easily changeable). SELECT col1, col2 FROM mytab...
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
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
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,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...

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.