55
questions
0
votes
0
answers
719
views
Command Timeout parameter in postgresql connection string is not working properly in npgsql
I am trying to configure command timeout within the connection string as follows:
`"ConnectionStrings": {
"EFCoreConnection" : "Host=localhost;Database=...
0
votes
0
answers
115
views
SQL Server command timeout: 3 options with .NET Entity Framework
From time to time I get a Azure database transaction timeout from a .NET core application using entity framework. What's the hierachy of setting the command timeout? There are three options: a) within ...
0
votes
1
answer
685
views
Why is timeout occurring while executing a stored procedure in C# even after increasing the commandtimeout property?
I have a piece of code that executes stored procedure.i have given a "Waitfor Delay '00:05' " in the SP for the purpose of testing the timeout in my C# code wherein my commandtimeout is set ...
6
votes
1
answer
4k
views
EF Core Command Timeout Not Taking Effect
I am finding that neither the DatabaseFacade.SetCommandTimeout method nor the SqlServerDbContextOptionsBuilder.CommandTimeout method are having any effect on my code and instead a long running SQL ...
0
votes
1
answer
161
views
How to support Command Time out in mysql version 5.6? I am looking for a CommandTimeout option similar to that of ADO .NET but in python
I am new to python and would like to do what ADO .NET CommandTimeout property does (setting the execution time for a query) in mysql (5.6).
I am looking for any in-built python libraries that may ...
0
votes
1
answer
540
views
Various difficulties creating ASP.NET Session tables via aspnet_regsql.exe
We're trying to move ASP.NET session state for one of our Azure web apps into a database, and it seems like the aspnet_regsql.exe tool is the way to go. Unfortunately, I'm getting stuck on a few ...
0
votes
0
answers
244
views
Select query from Oracle database is not getting timeout - Connected through ADODB interop
I am using ADODB interop DLL Version :6.0.0.0 to connect any type of database.
CommandTimeout is 3 seconds Opening the recordset with command object with timeout of 3 seconds.
With Oracle database ...
0
votes
0
answers
90
views
SqlCommand.ComandTimeout no effect
I am encountering a problem with the CommandTimeout property of my SqlCommand that I'm using to execute a stored procedure.
using (SqlCommand command = new SqlCommand("_UpdateWorldeaseIDs", ...
-3
votes
1
answer
6k
views
Command timeout property in VB
How can I override the default Command time out Property(30 seconds) to 600 seconds in VB?
I know we need to change the command time out in SQLhelper.vb
I have a code where i can see sqlcommand ...
1
vote
1
answer
618
views
How to set command timeout for entity objectcontext
I have a repository file in which we have created object context of entity type and not of ObjectContext class type
public class ShopRepository : GenericRepository<tbl_Shop>
{
// Entity ...
3
votes
2
answers
2k
views
Change CommandTimeout of SSIS OleDB Source programmatically?
in a quite big project we recently received the request to execute certain SSIS packages during regular business hours. However, while the package can take as long as it needs during the night, during ...
0
votes
1
answer
88
views
C# CommandTimeout Using statement issue
I have a method which has served me well, but now the queries have changed and I need to add a CommandTimeout to allow for the fact that some of the client machines on which this is executed are a ...
-1
votes
1
answer
2k
views
Update command timeout to 0 in mysql db configuration
How to update the command timeout in mysql database. I know how to do it at application level but I want to change the command timeout at db end. So that I have to change it only at one place.
At ...
5
votes
2
answers
3k
views
Oracle .net Provider CommandTimeout not worked
I am trying to change the command timeout for a OracleCommand query, but it is not worked so no timeout exception is not fired.
used Oracle.ManagedDataAccess.dll (4.121.2.0)
using (...
0
votes
0
answers
254
views
SQL Server log file is not available during a very long insert query
From Visual Studio 15, I am running an insert query to SQL Server. This is a Console Application. The application read from multiple files and enter near 200 000 records in a single run during which ...
2
votes
0
answers
378
views
DBContext Command Timeout: Why use IObjectContextAdapter?
So, I'm writing this code to Execute a stored procedure which is getting timed out in 30 seconds (which after some search I understood as the default value). When I searched for a way to increase the ...
3
votes
2
answers
5k
views
How to respect CommandTimeout when using Dapper.NET async API
I noticed that using the asynchronous API in Dapper.NET the command timeout value I pass in the extension method is not respected.
Then I came across the MSDN documentation of the SqlCommand....
0
votes
1
answer
197
views
Why am I getting "timeout" and "Cannot find table 0" and what preventive measures are at my disposal?
In the answer to a previous question here, I was advised to also ask about this related issue.
Once in awhile, the report generation code I have throws two exceptions (they don't display to the user, ...
2
votes
1
answer
943
views
What would cause/how can I prevent a ContextSwitchDeadlock?
I have a rather long-running process in a Windows Service that periodically throws a "ContextSwitchDeadlock" exception:
I have also rigged my service to send myself emails with details about ...
27
votes
1
answer
40k
views
Set Command Timeout in EF 6
I want to set command timeout for query execution, currently I am doing context.Database.CommandTimeout = 90; but i feel this is not working,
I tried checking the process logs in database but found ...
13
votes
5
answers
8k
views
If my C# times out with a stored procedure call, does the procedure continue running?
I have just a general type of question. If I have a C# application that calls a SQL Server stored procedure, and the C# application times out, does the procedure call on the server continue running ...
1
vote
1
answer
2k
views
API Calls with long DB query returning Gateway Timeout out despite extending timeouts
I'm using Entity Framework 6 to access a SQL Server in an API application. The API server and DB server are separate. I have a known long query that takes a little more than a minute to run. I have ...
2
votes
2
answers
3k
views
Change CommandTimeout Default Value globally
We migrated some piece of old software to a new server. We used SQL Server 2008 Enterprise in the past and now we are using SQL Server 2014 Enterprise on a new machine, so it should be faster now.
...
3
votes
1
answer
3k
views
Is there any negative effect to setting SqlCommand's CommandTimeout to a high value?
It seems that I was running into some random issues with a Stored Procedure when it took longer than the default timeout value; I was advised of that here.
So I increased the value, and it seems to ...
1
vote
1
answer
432
views
Will CommandTimeout property override timeout argument in SQL statement
If I use below c# code to retrieve stored procedure from DB
_command = database.GetStoredProcCommand("ReadQueue");
_command.CommandTimeout = 0;
ReadQueue procedure in DB:
BEGIN
EXEC('WAITFOR ...
1
vote
1
answer
673
views
CommandTimeout being ignored using DbDataAdapter.Fill
I cannot seem to get the CommandTimeout to work in the code below. I set the timeout value to 1 second just to test to ensure it works but it seems to be ignored. The SELECT statement takes about 15 ...
0
votes
1
answer
2k
views
How to set the DataContext.CommandTimeout application wide
I want to set the timeout for my DataContext Class application wide. I can find a lot of examples for C# (1, 2) translated to vb.net it would be
Partial Class SampleDBDataContext
Inherits System....
1
vote
0
answers
90
views
Partial Class Table Adapter is null
I would like to set the CommandTimeout on an ObjectDataSource used by ReportViewer.
I created a partial class, but the TableAdapter is null until I click on the TableAdapter in debug to expand the ...
-1
votes
1
answer
127
views
Code takes time that varies system to system
I am facing a problem for last 15 days. I have a code which contains a do-while loop and inside that there are 4 for loops. in each loop the following function is called.
Public Function retds1(ByVal ...
2
votes
2
answers
890
views
WebMatrix Database.Query with Custom CommandTimeout
Consider the following TestDb with TestTable and Procedure
USE TestDb
GO
--DROP TABLE dbo.TestTable
IF NOT EXISTS (SELECT 1 FROM sys.tables WHERE name = 'TestTable')
BEGIN
CREATE TABLE dbo....
0
votes
2
answers
3k
views
What is the proper way to run a long query against an active database?
We are using SQL Server 2012 EE but currently do not have the option to run queries on a R/O mirror though that is my long term goal, though am concerned I may run into the below issue in that ...
7
votes
1
answer
6k
views
How to set Nhibernate LINQ Command Timeout using Session.Query
Is anyone aware of a way to set the UnderlyingCriteria when using Session.Query?
I'm trying to set a more restrictive command timeout (or query timeout) for one specific query and I am trying to ...
14
votes
1
answer
12k
views
Set custom default CommandTimeout for all new Command Objects
The default CommandTimeout value is 30 seconds. You can manually change the value on an instance of the command object by doing the following
Dim cmd As New System.Data.SqlClient.SqlCommand
cmd....
2
votes
2
answers
1k
views
How to timeout "A network-related or instance-specific error occurred while establishing a connection to SQL Server" error
I am using sql server and sometimes my database goes down for maintenance. I have error handling code so the user don't see error page, instead they see a nice and friendly error message. My question ...
0
votes
1
answer
524
views
Alter new and existing session Command Timeout value
I’m a self-taught DBA in a manufacturing environment full of engineers who like to fiddle.
Although I have not given them sysadmin or any explicit extra rights I have an issue with some engineers ...
0
votes
1
answer
1k
views
How to set "timeout" when using the method "CreateSqlStringAccessor"?
I have a code like this, how I can do to set the "CommnadTimeout"?
var database = EnterpriseLibraryContainer.Current.GetInstance<Database>();
var sqlGetAllPersons = @"select * from Person....
33
votes
3
answers
35k
views
Set Command Timeout in entity framework 4.3
I cannot find the a way to set the command timeout of a linq query using entity framework 4.3 and its' DbContext.
How do I increase Commandtimeout in entity framework?
EDIT
I am actually looking for ...
6
votes
1
answer
3k
views
Entity Framework Migrations: Timeout SqlException during migrating
Sql Server is accessible. I want to migrate database using Entity Framework migrations. There i have "Images" table with 130k records having images. In migration there "INDEX" added to these table ...
79
votes
10
answers
120k
views
How to set CommandTimeout for DbContext?
I am looking a way to set CommandTimeout for DbContext. After searching I found the way by casting DbContext into ObjectContext and setting value for CommandTimeout property of objectContext.
var ...
9
votes
3
answers
17k
views
How to set CommandTimeout
I am using Microsoft.SqlServer.Management.Smo.
My Code:
Server server = new Server(new ServerConnection( new SqlConnection(ConnectionString));
server.ConnectionContext.ExecuteNonQuery(script);
I ...
0
votes
1
answer
7k
views
SQL Server timeout while executing stored procedure
I am experiencing a problem whereby executing a stored procedure to update a record in a table is resulting in a timeout error. I originally call my stored procedure from within an MVC3 application, ...
1
vote
1
answer
941
views
How to set commandTimeout for an ObjectDataSource
I need to set the commandTimeout for an ObjectDataSource in VB.NET and I can't find any way of doing it. I can do this easily in SqlDataSource but I'm restricted to using an ObjectDataSource.
Any ...
0
votes
1
answer
3k
views
How to handle SQL Query CommandTimeout in C# 2.0
I have got below code in c#.
SqlConnection conn = new SqlConnection("Data Source=MANOJ-PC\\SQLEXPRESS;Initial Catalog=master;Integrated Security=False;User Id=sa;Password=Manoj;");
conn.Open();
if (...
3
votes
1
answer
981
views
INSERT timeout during online index rebuild
Is there a way to prevent SQL INSERT timeouts during SQL Server index rebuild/reorganize operations? We are using NHibernate, command timeout set at 10 minutes, SQL Server 2008 R2, index rebuild is ...
23
votes
3
answers
4k
views
How do you set Command Timeout in Linqpad?
I have recently started using LinqPad, and bought the Autocomplete option and am really loving it. This is an excellent product!
I wanted to ask if there is a way for me to control the command ...
3
votes
1
answer
5k
views
manually increasing SQL server command timeout
I had a test windows host (50 MB) which was serving my ASP.NET web app, it worked almost fine, but after it was upgraded to 100 MB, I got frequent SQL server timeout errors when trying to remotely ...
4
votes
1
answer
3k
views
How to set a default NHibernate CommandTimeOut default value
How can i set an Session.DBCommand.CommandTimeOut NHibernate default value with Castle ActiveRecord?
this config line don't work.
<activerecord >
<config>
<add key="...
0
votes
2
answers
10k
views
Time Out Error in ASP.Net
How can I stop time out error for executing SQL query in ASP.Net?
I researched in Google but I couldn't solve my problem correctly.
25
votes
5
answers
54k
views
SqlCommand object, what length of time for CommandTimeout?
How do I decide what length of time to use as a timeout when using an SqlCommand object?
On parts of the code I'm working on (written by somebody else) I have:
cmd.CommandTimeout = 60;
Which I ...
3
votes
2
answers
11k
views
Timeout exception when timeout set to infinite time
In my C# .NET 3.5 application I am using CastleProject ActiveRecord over NHibernate. This is desktop application using MS SQL Server 2008. I have set ADO command timeout to 0 to prevent timeout ...