SQL Server Management Studio edit timeout - timeout

I am trying to run a query to edit records in SQL Server Management Studio 2008 and keep getting the error:
"SQL Execution Error.
Error Message: Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding."
I have set the following:
Execution Time-out: 0
Set Lock Timeout: -1
Transaction time-out after: 65535
The message appears at about 30 seconds....

There are locks on the database you are trying to change. You need to first remove the locks, then you can execute your change.

Related

Mongo::Error::SocketError: Broken pipe when executing queries in a mongo replica set

I randomly get this error from my rails app connected to a mongo replica set. This then leads to the server description getting changed to 'unknown' and server selection starting all over again.
This doesn't happen when I try running the app in local connected to a standalone mongod server.
For some reason, connecting to a replica set and executing repeated queries on it results in
Read retry due to: Mongo::Error::SocketError EOFError: end of file reached
Is this an issue with the underlining SSL/TLS connection to the replica set? I've tried increasing the socket_timeout, connection_timeout in my mongoid.yml with no success.
This happens when the server closes the connection to the client. One time when that happens is when a replica set has an election - the old primary closes all of its connections with MongoDB 4.0 and earlier (not with 4.2+).
Since the read is retried, the situation does not generally affect the application other than the diagnostic message being printed that you see.
You can look into the server logs at the time when the message is printed to see why the server closed the connection. Sometimes connections are closed without server-side logging (for example, when the server process terminates it doesn't log all connection closes).

org.apache.commons.dbcp.SQLNestedException: Cannot get a connection, pool error Timeout waiting for idle object

We have a connection pool for an embedded derby database. We are setting
max wait time to 5 secs
max connection in pool 100
We are getting org.apache.commons.dbcp.SQLNestedException: Cannot get a connection, pool error Timeout waiting for idle object very frequently. When this exception is coming, the connections owned by the application is always 1, this is evident from the logs.
The above exception states that the pool manager cannot produce a viable connection to a waiting requester and the maxWait has passed therefore triggering a timeout.
Ref: Cannot get a connection, pool error Timeout waiting for idle object in PutSQL?
There is 1 application using derby, the Derby database, and 2 other applications.
As per my understanding, the following are the main reason for not getting a connection
There is a network issue
Connection pool has been exhausted, because of connection leak
Connection pool getting exhausted, because of long-running queries
In our case, it's an embedded derby database which is local to the application.
So, network issue is ruled out. There are no long-running queries.
I am not able to figure out what is causing wait timeout. Could it be related to OS, Filesystem, server utilization going high etc?
Any help is appreciated.

With Delphi and Indy 10.6 how do I keep the TIdTCPServer from dropping a client on read timeout

I've noticed that, when my TCPServer is set for 30 sec read timeout, even though I am handling the EIdReadTimeout in the ServerExecute, and Raise it again there, then handle it in ServerException and show the timeout message there, it still drops that specific client without me telling it to. On the Client side I handle the EIdReadTimeout and it doesn't drop the server connection.
I want the Server side to do the same thing so I can set the Server timeout at 30 sec and the client at 45 sec so the server can send a timeout message to the Client for a retry and not abort the connection entirely.

TinyTds Error: Adaptive Server connection timed out

We are running a ruby on rails application on rails 3.2.12 (ruby 1.9.3) with current tinyTDS gem 0.6.2.
We use MS SQL 2012 or 2014 and facing more then usual the following error message:
TinyTds::Error: Adaptive Server connection timed out: EXEC sp_executesql [...]
Database AUTOCLOSE is off.
TCP Socket Timeouts are default Windows system.
Application server is on machine #1 (windows server), SQL server is on machine #2 (windows server).
When I check the connections (netstat) I have like 250 connections open for around 20-30 users.
I run perform.exe to see idle time on SQL server for the data and log disks.
database.yml has connection pool:32 and reconnect:true.
To me it looks like that tinyTDS lost connection and any exception prevents from reconnecting.
The question is, how can I debug into the problem to find out what the problem is?
UPDATE
My mistake, the original error message belongs to tinytDS 0.5.x. Since I updated to the latest version I get the following error in addition or instead:
ActiveRecord::LostConnection (TinyTds::Error: DBPROCESS is dead or not enabled: BEGIN TRANSACTION):
First, that pool size seems excessive. Are you using a ton of threads? If not, then only one connection will be used per app request/response. Just seems like that value is way to high.
Second, what SQL timed out? Have you found that certain SQL is slower than others? If so, then you have two options. The first would be to tune the DB using standard practices like indexes, etc. The second would be to increase the "timeout" option in your database.yml. The default timeout is 5000 which is 5 seconds. Have you tried setting it to 10000? I guess what I am asking is how are you sure this is a "connect" timeout vs a "wait" timeout?

Command time out Error in Delphi ADO

I am executing a storedprocedure in Oracle With ADOStoredProcedure in Delphi 2010. The procedure execution time is 2 minutes.I set Command timeout to 20 Seconds.
When I am Executing the procedure ,Error is not raising related to timeout & procedure is executing for 2 minutes. How to get error at 20th Second
I used Connection string
'Provider=MSDAORA.1;Password=pthmu;User ID=pthmu;Data Source=orcl_300'
The behaviour of ADO.CommandTimeout is depending on provider and data source as stated in the documentation
Use the CommandTimeout property on a Connection object or Command
object to allow the cancellation of an Execute method call, due to
delays from network traffic or heavy server use. If the interval set
in the CommandTimeout property elapses before the command completes
execution, an error occurs and ADO cancels the command. If you set the
property to zero, ADO will wait indefinitely until the execution is
complete. Make sure the provider and data source to which you are
writing code support the CommandTimeout functionality.
UPDATE
Connection Timeout and Query Timeout Not Supported with Microsoft Oracle ODBC Driver and OLE DB Provider
After the query has been sent to the Oracle server, there is no way to cancel the query by using the Oracle OCI. In the case of the preceding connection timeout, you are canceling the request for the connection before it has been completed.

Resources