473,407 Members | 2,359 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,407 software developers and data experts.

Need advice for tracking down a general network error exception

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. The .NET 2.0 exception does
give a little more info than .NET 1.1 did, but not much.

Can anybody give any pointers about how to track this down? It occurs every
10 hrs around the clock, like clockwork.

I have included the stack trace, but omitted the trace from my code. The
application is attempting to fill a dataset from a SQL Server 2000 box. The
frequency at which it attempts this is customer defined, but I believe it is
doing it every minute. There are other applications at the customer site
using that server. It is not possible to disable them, as they run their
business. Haven't been able to duplicate this error inhouse.

Thanks.

-- Alan
System.Data.SqlClient.SqlException: A transport-level error has occurred
when sending the request to the server. (provider: Named Pipes Provider,
error: 0 - An unexpected network error occurred.)
Source: .Net SqlClient Data Provider
HResult: -2146232060 (0x80131904)
Errors Collection:
-------------------------------------
Class: 20
LineNumber: 0
Message: A transport-level error has occurred when sending the request to
the server. (provider: Named Pipes Provider, error: 0 - An unexpected
network error occurred.)
Number: 59
Procedure:
Server: xxxx2K3012
Source: .Net SqlClient Data Provider
State: 0
ErrorCode: -2146232060

System.Data.SqlClient.SqlException: A transport-level error has occurred
when sending the request to the server. (provider: Named Pipes Provider,
error: 0 - An unexpected network error occurred.)
at System.Data.SqlClient.SqlConnection.OnError(SqlExc eption exception,
Boolean breakConnection)
at System.Data.SqlClient.SqlInternalConnection.OnErro r(SqlException
exception, Boolean breakConnection)
at
System.Data.SqlClient.TdsParser.ThrowExceptionAndW arning(TdsParserStateObject
stateObj)
at System.Data.SqlClient.TdsParserStateObject.ThrowEx ceptionAndWarning()
at System.Data.SqlClient.TdsParserStateObject.WriteSn i()
at System.Data.SqlClient.TdsParserStateObject.WritePa cket(Byte flushMode)
at System.Data.SqlClient.TdsParserStateObject.Execute Flush()
at System.Data.SqlClient.TdsParser.TdsExecuteRPC(_Sql RPC[] rpcArray,
Int32 timeout, Boolean inSchema, SqlNotificationRequest notificationRequest,
TdsParserStateObject stateObj)
at System.Data.SqlClient.SqlCommand.RunExecuteReaderT ds(CommandBehavior
cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async)
at System.Data.SqlClient.SqlCommand.RunExecuteReader( CommandBehavior
cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method,
DbAsyncResult result)
at System.Data.SqlClient.SqlCommand.RunExecuteReader( CommandBehavior
cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method)
at System.Data.SqlClient.SqlCommand.ExecuteReader(Com mandBehavior
behavior, String method)
at System.Data.SqlClient.SqlCommand.ExecuteDbDataRead er(CommandBehavior
behavior)
at
System.Data.Common.DbCommand.System.Data.IDbComman d.ExecuteReader(CommandBehavior
behavior)
at System.Data.Common.DbDataAdapter.FillInternal(Data Set dataset,
DataTable[] datatables, 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)
Jan 18 '06 #1
7 9514
Alan,

If I see this, than I have forever to think about backupprocesses.

You are sure that such a kind of process is not interfering your application
and the standards it assumes.

As at least Bill Vaughn and I as well have seen is, that you can have this
kind this kind of problems even from a not good working light bulb or an
antenna from a car which is leaving the garage and hits the building.

Just a thought,

Cor
Jan 18 '06 #2
On Wed, 18 Jan 2006 01:19:50 -0600, "Alan Pretre" <no@spam> wrote:

¤ 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. The .NET 2.0 exception does
¤ give a little more info than .NET 1.1 did, but not much.
¤
¤ Can anybody give any pointers about how to track this down? It occurs every
¤ 10 hrs around the clock, like clockwork.
¤

The problem is network or database server related. It could be a temporary loss of network
connectivity or that the database server is temporarily unavailable and cannot handle the request.

Someone needs to monitor the network traffic and the database server in order to determine what
might be happening when this error occurs.
Paul
~~~~
Microsoft MVP (Visual Basic)
Jan 18 '06 #3
I could be wrong, but it looks like you keep the connection open all the
time, better would be to open the connection for each request. That would
give you more control to handle connection problems whenever they happen.
Another thing to watch for is wheter SQL is not scheduled for unattended
off-line back-ups. And a last question is why you are using a named pipe
transport protocol instead of TCP?

Willy.

"Alan Pretre" <no@spam> wrote in message
news:ez****************@TK2MSFTNGP11.phx.gbl...
|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. The .NET 2.0 exception
does
| give a little more info than .NET 1.1 did, but not much.
|
| Can anybody give any pointers about how to track this down? It occurs
every
| 10 hrs around the clock, like clockwork.
|
| I have included the stack trace, but omitted the trace from my code. The
| application is attempting to fill a dataset from a SQL Server 2000 box.
The
| frequency at which it attempts this is customer defined, but I believe it
is
| doing it every minute. There are other applications at the customer site
| using that server. It is not possible to disable them, as they run their
| business. Haven't been able to duplicate this error inhouse.
|
| Thanks.
|
| -- Alan
|
|
| System.Data.SqlClient.SqlException: A transport-level error has occurred
| when sending the request to the server. (provider: Named Pipes Provider,
| error: 0 - An unexpected network error occurred.)
| Source: .Net SqlClient Data Provider
| HResult: -2146232060 (0x80131904)
| Errors Collection:
| -------------------------------------
| Class: 20
| LineNumber: 0
| Message: A transport-level error has occurred when sending the request
to
| the server. (provider: Named Pipes Provider, error: 0 - An unexpected
| network error occurred.)
| Number: 59
| Procedure:
| Server: xxxx2K3012
| Source: .Net SqlClient Data Provider
| State: 0
| ErrorCode: -2146232060
|
| System.Data.SqlClient.SqlException: A transport-level error has occurred
| when sending the request to the server. (provider: Named Pipes Provider,
| error: 0 - An unexpected network error occurred.)
| at System.Data.SqlClient.SqlConnection.OnError(SqlExc eption exception,
| Boolean breakConnection)
| at System.Data.SqlClient.SqlInternalConnection.OnErro r(SqlException
| exception, Boolean breakConnection)
| at
|
System.Data.SqlClient.TdsParser.ThrowExceptionAndW arning(TdsParserStateObject
| stateObj)
| at System.Data.SqlClient.TdsParserStateObject.ThrowEx ceptionAndWarning()
| at System.Data.SqlClient.TdsParserStateObject.WriteSn i()
| at System.Data.SqlClient.TdsParserStateObject.WritePa cket(Byte
flushMode)
| at System.Data.SqlClient.TdsParserStateObject.Execute Flush()
| at System.Data.SqlClient.TdsParser.TdsExecuteRPC(_Sql RPC[] rpcArray,
| Int32 timeout, Boolean inSchema, SqlNotificationRequest
notificationRequest,
| TdsParserStateObject stateObj)
| at System.Data.SqlClient.SqlCommand.RunExecuteReaderT ds(CommandBehavior
| cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async)
| at System.Data.SqlClient.SqlCommand.RunExecuteReader( CommandBehavior
| cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method,
| DbAsyncResult result)
| at System.Data.SqlClient.SqlCommand.RunExecuteReader( CommandBehavior
| cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method)
| at System.Data.SqlClient.SqlCommand.ExecuteReader(Com mandBehavior
| behavior, String method)
| at System.Data.SqlClient.SqlCommand.ExecuteDbDataRead er(CommandBehavior
| behavior)
| at
|
System.Data.Common.DbCommand.System.Data.IDbComman d.ExecuteReader(CommandBehavior
| behavior)
| at System.Data.Common.DbDataAdapter.FillInternal(Data Set dataset,
| DataTable[] datatables, 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)
|
|
Jan 18 '06 #4

"Willy Denoyette [MVP]" <wi*************@telenet.be> wrote in message
news:em**************@TK2MSFTNGP11.phx.gbl...
I could be wrong, but it looks like you keep the connection open all the
time, better would be to open the connection for each request. That would
give you more control to handle connection problems whenever they happen.
Another thing to watch for is wheter SQL is not scheduled for unattended
off-line back-ups. And a last question is why you are using a named pipe
transport protocol instead of TCP?


Thanks, I am investigating the connection pooling situation. I was able to
track down this article, it may apply to me.

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

I don't knowingly have connection pooling disabled.

-- Alan
Jan 18 '06 #5
"Willy Denoyette [MVP]" <wi*************@telenet.be> wrote in message
news:em**************@TK2MSFTNGP11.phx.gbl...
I could be wrong, but it looks like you keep the connection open all the
time, better would be to open the connection for each request. That would
give you more control to handle connection problems whenever they happen.
I have checked my connection string (not as obvious as it would seem, as it
is dynamically created), it looks like this:

user id=xxx ;password=xxx ;initial catalog=xxx ;data source=xxx;Connect
Timeout=15

I do not have Pooling=false in there.

I came across this article:

ADO.NET Connection Pooling FAQ
http://www.c-sharpcorner.com/Code/20.../PoolingNS.asp

In the section, "Tips and Tricks for better use of connection pooling", he
says this:

"Do not close all your connections in the pool, keep at least one
connection alive."

I wonder if this is my problem. Should I have an unused connection that is
always connected during the lifetime of the app, in addition to the ones
that I have now?
Another thing to watch for is wheter SQL is not scheduled for unattended
off-line back-ups.
This was a concern, but we have verified that they are not running backups
every 10 hrs.
And a last question is why you are using a named pipe transport protocol
instead of TCP?


Not sure about the answer to this one, I'll have to look into it. The
connection string I use is generated by a component from another group in my
company. (It is not static).
-- Alan
Jan 18 '06 #6

"Alan Pretre" <no@spam> wrote in message
news:OZ**************@TK2MSFTNGP14.phx.gbl...
|
| "Willy Denoyette [MVP]" <wi*************@telenet.be> wrote in message
| news:em**************@TK2MSFTNGP11.phx.gbl...
| >I could be wrong, but it looks like you keep the connection open all the
| > time, better would be to open the connection for each request. That
would
| > give you more control to handle connection problems whenever they
happen.
| > Another thing to watch for is wheter SQL is not scheduled for unattended
| > off-line back-ups. And a last question is why you are using a named pipe
| > transport protocol instead of TCP?
|
| Thanks, I am investigating the connection pooling situation. I was able
to
| track down this article, it may apply to me.
|
| http://support.microsoft.com/default...b;en-us;328476
|
| I don't knowingly have connection pooling disabled.
|
| -- Alan
|
|

Connection pooling is on by default, the question remains however; do you
close the connection in the application yes or no? If you don't, you keep a
logical connection from the pool and this one keeps a physical connection
with SQL. In this case, the problem starts when the physical connection
breaks for one another reason, whenever you issue the fill request (on the
logical connection), an exception will be thrown on you. If however, you
close the logical connection after each 'transaction' and re-open the
logical connection at the start of the next one, the pool manager will pass
you an 'established' physical connection from the pool, not a broken one.
Of course this doesn't explain why a connection fails at regular intervals,
my experience is scheduled activities in the server running SQL,
synchronizing DNS servers and SQL in fail-over clusters.

About the KB article all I can say is that it applies to TCP protocol
connections, but you are using named pipes and my question was if you did
have any specific reason for that?
I also have no idea about your network infrastructure, how is the client
connected? through a switched network? are routers involved (take care here
with named pipes!).
What about the server, how many connections are there configured for SQL and
how many are there used at any time.

Willy.
Jan 18 '06 #7
"Willy Denoyette [MVP]" <wi*************@telenet.be> wrote in message
news:O6**************@TK2MSFTNGP10.phx.gbl...
Connection pooling is on by default, the question remains however; do you
close the connection in the application yes or no? If you don't, you keep
a
logical connection from the pool and this one keeps a physical connection
with SQL. In this case, the problem starts when the physical connection
breaks for one another reason, whenever you issue the fill request (on the
logical connection), an exception will be thrown on you. If however, you
close the logical connection after each 'transaction' and re-open the
logical connection at the start of the next one, the pool manager will
pass
you an 'established' physical connection from the pool, not a broken one.
Of course this doesn't explain why a connection fails at regular
intervals,
my experience is scheduled activities in the server running SQL,
synchronizing DNS servers and SQL in fail-over clusters.
This would be a typical fill. Note the Connection usage. Is this closing
the logical or physical connection?

public int Fill() {
int NumRows = 0;

using (System.Data.SqlClient.SqlConnection Connection = new
System.Data.SqlClient.SqlConnection(_Connection.Co nnectionString)) {
Connection.Open();

using (cfgDevicesDataAdapter daDevices = new
cfgDevicesDataAdapter(Connection)) {
if (_Timeout >= 0) {
daDevices.CommandTimeout = _Timeout;
} else {
daDevices.ResetCommandTimeout();
}

// Specify all records, sort on DeviceName.
daDevices.All("DeviceName ASC");

// Read the records.
if (Connection.State == System.Data.ConnectionState.Open) {
bool OldEnforceConstraints = EnforceConstraints;
EnforceConstraints = false;
NumRows += daDevices.Fill(this);
EnforceConstraints = OldEnforceConstraints;
}
}
}

return NumRows;
}

I think I will need to add some retry logic around the Connection.Open().
About the KB article all I can say is that it applies to TCP protocol
connections, but you are using named pipes and my question was if you did
have any specific reason for that?
There is no good answer to this, I have already brought it up with the group
responsible for creating the connection string the possibility of either
defaulting or allowing the protocol to be specified. Right now, it is
simply unspecified, which I gather uses whatever the SQL Server is defaulted
to.
I also have no idea about your network infrastructure, how is the client
connected? through a switched network? are routers involved (take care
here
with named pipes!).
What about the server, how many connections are there configured for SQL
and
how many are there used at any time.


This stuff is a little hard to find out, as the sites are scattered around
the United States and other employees here do the installs. If I can get
this connection pooling stuff straightened out, and this TCP protocol
specified, maybe those are good avenues to pursue at this point.
Did you see my other post, where I asked the question about leaving another
"unused" connection open all the time?

-- Alan
Jan 18 '06 #8

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

Similar topics

2
by: stanley j Mroczek | last post by:
Every thing is on one machine, Programs and sql. Sql is up and running(can test with query analyzer). No changes where made! This was working fine. How do you track this error? What network...
2
by: SteveS | last post by:
Hello all. This problem is stumping me.... I run a page called "default.aspx". For some reason when I execute this page, I get the error below. It seems to run through the entire code behind...
7
by: stan | last post by:
I have .net 2003 and SQL 2000 setup on one system. All I have is one computer (no network). I am able to get to the internet that works. I can run SQL Query Analyzer and it works. The program was...
0
by: David Sworder | last post by:
Hi there, I am using the SQL managed provider in ADO.NET to fill a dataset with a large number of records. I periodically get an exception with the description "General Network Error" when trying...
5
by: Buddy | last post by:
Hello, I'm getting the following error when running a large SQL. I am using the SqlCommand and calling the ExecuteNonQuery with the CommandTimeout set to 0. Here is the example of the code ...
7
by: Joe Ross | last post by:
I've been working with Microsoft support for over 3 weeks now on an intermittent General Network Error we're seeing in our production environment between our ASP.NET application and SQL Server...
0
by: johnkamal | last post by:
Hi, Some times while opening a page, I am getting the following error message, Please help me to rectify the problem. Server Error in '/' Application. General network error. Check your...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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
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
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
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

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.