Unable to enable receive locations (many of them) - biztalk

Whenever I try to enable these receive locations, I get the sql time out error. Moreover there are many service instances and messages which are in active state or Dehydrated (Queued awaiting processing).
TITLE: BizTalk Server Administration
Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding. (.Net SqlClient Data Provider)
For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&EvtSrc=MSSQLServer&EvtID=-2&LinkId=20476
ADDITIONAL INFORMATION:
The wait operation timed out
BUTTONS:
OK
I had tried restarting the host instances, but it did not work. The environment is a clustered server. There looks like no performance issue: no memory or cpu spikes.

Related

Connection Timeout Expired When there are many requests simultaneously

I have a .Net Application(REST API) which accesses SQL Server Database. Sometimes When there are many API requests at the same time, I get Connection Timeout exception due to which all the request fails. This is not always the case and happens only when there are many requests hitting the server at the same time.
Exception Details:
System.Data.SqlClient.SqlException (0x80131904): Connection Timeout
Expired. The timeout period elapsed while attempting to consume the
pre-login handshake acknowledgement. This could be because the
pre-login handshake failed or the server was unable to respond back in
time. The duration spent while attempting to connect to this server
was - [Pre-Login] initialization=4; handshake=14992; --->
System.ComponentModel.Win32Exception (0x80004005): The wait operation
timed out.
Any help here will be highly appreciated.
From this (upvoted) comment
in this case may be few reasons:
1. You are using SQL Server Express
2. Dead lock between your queries
3. Queries executed more then standard timeout- 30 sec
You should first exclude N1, as the server Edition has nothing to do with connection timeout that is imposted by client
Then exclude N2 as the deadlocks are resolved automatically by server deadlock monitor that controls for deadlocks every 5 seconds or even less when the deadlocks are frequent.
Than exclude N3 as connection timeout has nothing to do with execution timeout. And your timeout is CONNECTION timeout.
You should increase connection timeout on your client or troubleshoot your server, what happens there that your server becomes unresponsive.

weird situation with sql express

I have this weird problem with Sql server express (2012) where I load lots of data into memory (with entity framework), make some computations with it, then bulk insert it back into temporary table and invoke stored procedure which using merge statement writes back the results (writing is done after the data loaded in multiple non-overlapping batches). The problem starts when I launch several such computations in parallel - suddenly for about 30 seconds database becomes unreachable. All the tables and not just used in the computation give this on select:
System.Data.SqlClient.SqlException: Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding. ---> System.ComponentModel.Win32Exception: The wait operation timed out
at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction)
While select from management studio are ok.
Weird, like I said as if some resource is out. This is express and I can't even profile it properly. Any suggestions on how to identify the culprit are appreciated.
Edit
I've now discovered that sometimes situation is getting even worse with management studio not able to connect to server at all:
A connection was successfully established with the server, but then an error occurred during the pre-login handshake. (provider: SSL Provider, error: 0 - The wait operation timed out.) (Microsoft SQL Server, Error: 258)
Edit2 Ok the culprit is 1Gb memory limitation in express. I'm frustrated with that, seriously, 1Gb? I wander why not to just use plane files or something?

Error : Timeout expired. The timeout period elapsed prior to obtaining a connection from the pool

We are having an error in our developed ASP.net application. Error is just below. We deployed this application to many customers. But one of them is getting this error every day. I set the Max Pool Size tp 6000 in connection string but the error keeps occuring. I've analyzed my data access layer to closing connection strategy. But there's no mistake in DAL. When the error is thrown, I executed SP_WHO or SP_WHO2 stored proceducer. There is no open connection and the connection list has an average of 50-60 quantities. I tried every method but I can't resolve the problem.
I'm having this error since the server is changed from SQL 2008 R2 to SQL 2012.
I suspect the server has been changed or .NET Framework version.
There error is either caused by running out of connections in your pool but if you have set the pool size to 6000 (eeeek) then it won't be that.
The second cause is a connection timeout to the sql box, the default is 15 seconds which should be plenty but you can try increasing it and see if you get less errors - if you do then there is something wrong with sql or the connection between the server and the database.
Please please please make sure you have all our SqlConnections inside using blocks and they are being put back in the pool.
ed

ODP.NET Connection Pooling Issues - Fault Tollerance After Database Goes Down

I have an WebAPI service using ODP.NET to make connections to several oracle databases. Normally the web service would be hit several times a second and will never have long periods on inactivity. In our test site however, we did not use it for 2-3 days. This morning, we hit the service and got "connection request timeout" exceptions from ODP.NET, suggesting that the connection pool was out of available connections. We are closing the connections after use. The service was working fine before the period, but today the very first query got the timeout exception. Our app pool in IIS is configured to never reset.
My question then is, what can cause the connection pool to fill with bad connections after a period of inactivity, where these connections are not cleaned up in the usual 3 minute cycle? It only happened to 2 out of the 3 of our databases, and Validate Connection=true is set for all of them.
EDIT
So after talking to the DBA, there is some different between a connection/session being killed manually or by timeout and the database server severing the TCP connections. In this case, the TCP connection was severed as part of a regular backup (why is not important for this). I guess this happens when the whole database server goes offline at once. The basis of the question still applies I think though: why is ODP.NET unable to cleanup severed connections overtime? There is a performance counter that refers to "Stasis" connections, could those connections be stuck in that state? I would think that it should be able to see that a connection is no longer active (Validate Connection=True), kill it and not return it to the pool.
Granted, this problem can be solved by just resetting the app pool everything the database goes down. I would still like to configure ODP.NET connection pooling to be more fault tolerant.
I have run into this same issue, and the only solution I have found is to use the Connection Lifetime connection string parameter in conjunction with Validate Connection.
In my particular case, the connection timeout was set at the server and the connections in the pool would timeout, but not be sniped out of the pool, resulting in errors.
Setting both the Connection Lifetime and the Validate Connection parameters has resolved the issue.
Make sure the Connection Lifetime value that you choose is less than the server connection inactivity timeout.
The recommended solution is to use ODP.NET Fast Connection Failover (FCF). FCF will automatically remove invalid connections from the pool such that you don't need to use Validate Connection, Connection Lifetime, nor clear the pool.
To use FCF, set "HA events=true", use connection pooling, and have your DBA set up Fast Application Notification (FAN) on the server side. FAN is what alerts the ODP.NET pool when a DB service or node goes down or rebooted. Upon receiving the message, ODP.NET knows which connections to remove from the pool and removes them, leaving all other valid connections untouched.
Something else is going on here. Min Pool Size and some of the other settings help when the connection is severed from things like DBA configured idle timeouts and firewall tcp idle timeouts, 'connection request timeout' occurs when created a new connection.
This could be simple network problem. There could be something interfering with dns resolution of the servers. Another case is not having fully qualified entries in tnsnames. I've been bit by the latter a couple of times.
The other issue is the one you've already recognized - full pool.
Double check that you don't have a connection leak somewhere. A missing .Close is one thing but if you're not using a 'using' statement, a try/finally is required as an unhandled exception could be thrown prior to the .Close.
I would use perfmon to monitor some of the connection statistics to start - NumberOfPooledConnections, NumberOfActiveConnections, etc:

The error threshold has been exceeded. The receive location is shutting down

I am doing polling using SQL adapter......For small records polling is succesful......but for large recorde i am getting following error..
The receive location "RcvSqlDataLoc" with URL "" is shutting down. Details:"The error threshold has been exceeded. The receive location is shutting down.".
Try checking your SQL server management console for deadlocks while the long running transaction is executing. If you don't need a transaction there's an option in the configuration of the port for automatically wrapping the session in a transaction. You might try turning that off.

Resources