Questions tagged [command-timeout]

53 questions
1
vote
1 answer

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 set the CommandTimeout on my EF DbContext using the…
Sparafusile
  • 4,696
  • 7
  • 34
  • 57
1
vote
1 answer

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 (RECEIVE * FROM MSGQUEUE), TIMEOUT 120000…
Sean
  • 981
  • 1
  • 9
  • 19
1
vote
1 answer

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 seconds to run and it runs to completion. I am…
Gene S
  • 2,735
  • 3
  • 25
  • 35
1
vote
0 answers

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 properties. Only then does the TableAdapter get…
jplab
  • 11
  • 2
1
vote
1 answer

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 help would be greatly appreciated. Thanks
Greyhound
  • 33
  • 1
  • 6
0
votes
1 answer

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 (conn != null) { //create command …
Manoj Singh
  • 7,569
  • 34
  • 119
  • 198
0
votes
2 answers

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.
0
votes
1 answer

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 for 10 mins. While debugging, after 20 seconds or so when…
Riya
  • 1
0
votes
1 answer

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 support it by default (I have tried pymysql, pyodbc…
Joel
  • 1
  • 2
0
votes
1 answer

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 issues below. It's an Azure SQL database, and I'm…
0
votes
0 answers

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 with huge data, when I enter select query, itdoes…
0
votes
0 answers

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", SqlC_SSuite)) { command.CommandType =…
Nick
  • 882
  • 2
  • 9
  • 31
0
votes
1 answer

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 little under-powered. The issue I'm having is the…
Shanef
  • 1
0
votes
0 answers

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 connection is closed and opened for any new folder…
0
votes
1 answer

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, and they think everything is hunky dory), but I…