Sample Header Ad - 728x90

Database Administrators

Q&A for database professionals who wish to improve their database skills

Latest Questions

3 votes
1 answers
2550 views
wait_timeout kills session in SLEEP MODE or all connection ?`
Do wait_timeout session clear all running session or only sessions which are in SLEEP mode for specified seconds ?
Do wait_timeout session clear all running session or only sessions which are in SLEEP mode for specified seconds ?
simplifiedDB (679 rep)
Apr 27, 2017, 12:27 PM • Last activity: Jul 4, 2025, 03:03 PM
0 votes
1 answers
1219 views
Mysql - Set timeout for Alter table & Update scripts
On MySQL 5.7. I would like to prevent all alter table scripts \ update scripts that are taking longer than 10 minutes to run. Is it possible? I've tried to set **MAX_EXECUTION_TIME** and it does work but only for SELECT queries. I still could execute a long update\alter query.
On MySQL 5.7. I would like to prevent all alter table scripts \ update scripts that are taking longer than 10 minutes to run. Is it possible? I've tried to set **MAX_EXECUTION_TIME** and it does work but only for SELECT queries. I still could execute a long update\alter query.
Urbanleg (375 rep)
Sep 12, 2021, 11:57 AM • Last activity: Jun 1, 2025, 06:07 PM
4 votes
1 answers
2598 views
How to put an execution time limit for MySQL Temporary table creation
We can use `SET MAX_EXECUTION_TIME=10;` statement to stop the execution of a `SELECT` statement, if it took more than 10 milliseconds to execute the query. But the same wont work for other statements like `CREATE TEMPORARY TABLE` and `INSERT` etc. Reference: https://dev.mysql.com/doc/refman/5.7/en/o...
We can use SET MAX_EXECUTION_TIME=10; statement to stop the execution of a SELECT statement, if it took more than 10 milliseconds to execute the query. But the same wont work for other statements like CREATE TEMPORARY TABLE and INSERT etc. Reference: https://dev.mysql.com/doc/refman/5.7/en/optimizer-hints.html#optimizer-hints-execution-time Currently my temporary table creation takes more than 50s to complete. I want to put a limit like 10s. Is it possible in MySQL?
Sarath S Nair (163 rep)
Mar 12, 2018, 05:34 AM • Last activity: Apr 26, 2025, 01:09 PM
0 votes
1 answers
292 views
sql server replication issue
My SQL Server version is 2012 R2. I have one publishing machine with several publications, one distribution machine, and several subscription machines. Everything is working fine. However, when I try to add a new subscription on one of the publishers (The size of this database is close to 150 GB) an...
My SQL Server version is 2012 R2. I have one publishing machine with several publications, one distribution machine, and several subscription machines. Everything is working fine. However, when I try to add a new subscription on one of the publishers (The size of this database is close to 150 GB) and start the agent to create a snapshot, it gives me the following error message when it reaches 99%, Based on the information provided, there are some indications of query timeouts. I checked the setting: Property -> Connection -> Remote Query Timeout value 0,which means there is no limit for the duration of remote queries. plz advise, thanks all!
Error Message: 
Message: A transport-level error occurred when sending the request to the server. (provider: TCP Provider, error: 0 - The remote host forcibly closed an existing connection.) 
Command Text: sp_MSget_synctran_commands Parameters: @publication = xxxx_publish

Stack: 
at Microsoft.SqlServer.Replication.AgentCore.ReMapSqlException(SqlException e, SqlCommand command) 
at Microsoft.SqlServer.Replication.AgentCore.AgentExecuteReader(SqlCommand command, Int32 queryTimeout, CommandBehavior commandBehavior) 
at Microsoft.SqlServer.Replication.AgentCore.ExecuteWithOptionalResults(CommandSetupDelegate commandSetupDelegate, ProcessResultsDelegate processResultsDelegate, Int32 queryTimeout, CommandBehavior commandBehavior) 
at Microsoft.SqlServer.Replication.AgentCore.ExecuteWithOptionalResults(CommandSetupDelegate commandSetupDelegate, ProcessResultsDelegate processResultsDelegate) 
at Microsoft.SqlServer.Replication.Snapshot.TransSnapshotCommandManager.AddSyncTranCommands() 
at Microsoft.SqlServer.Replication.Snapshot.TransSnapshotCommandManager.AddSnapshotCommands() 
at Microsoft.SqlServer.Replication.Snapshot.TransSnapshotProvider.AddTransCommandsAndSetArticleTranIDTransaction(SqlConnection connection) 
at Microsoft.SqlServer.Replication.RetryableSqlServerTransactionManager.ExecuteTransaction(Boolean bLeaveTransactionOpen) 
at Microsoft.SqlServer.Replication.Snapshot.TransSnapshotProvider.DoConcurrentPostArticleFilesGenerationProcessing() 
at Microsoft.SqlServer.Replication.Snapshot.SqlServerSnapshotProvider.GenerateSnapshot() 
at Microsoft.SqlServer.Replication.SnapshotGenerationAgent.InternalRun() 
at Microsoft.SqlServer.Replication.AgentCore.Run() (Source: MSSQLServer, Error Number: 10054) Get Help: http://help/10054  
Server xxxx, Level 20, State 0, Line 0 
A transport-level error occurred when sending the request to the server. (provider: TCP Provider, error: 0 - The remote host forcibly closed an existing connection.) (Source: MSSQLServer, Error Number: 10054)
Mr.spark (23 rep)
Oct 13, 2023, 12:49 AM • Last activity: Oct 13, 2023, 12:31 PM
14 votes
2 answers
24382 views
Why "SET LOCAL statement_timeout" does not work as expected with PostgreSQL functions?
My understanding is that PostgreSQL functions are executed similar to a transaction. However, when I tried to "SET LOCAL statement_timeout" within a function, it did not work. Here's how it works within a transaction: BEGIN; SET LOCAL statement_timeout = 100; SELECT pg_sleep(10); COMMIT; where the r...
My understanding is that PostgreSQL functions are executed similar to a transaction. However, when I tried to "SET LOCAL statement_timeout" within a function, it did not work. Here's how it works within a transaction: BEGIN; SET LOCAL statement_timeout = 100; SELECT pg_sleep(10); COMMIT; where the results are (as expected): BEGIN SET ERROR: canceling statement due to statement timeout ROLLBACK However, if I put the same commands within a function body: CREATE OR REPLACE FUNCTION test() RETURNS void AS ' SET LOCAL statement_timeout = 100; SELECT pg_sleep(10); ' LANGUAGE sql; SELECT test(); the timeout does not occur, and the function test() takes 10 seconds to execute. Please advise on why the two cases differ, and how I can correct it to set statement timeouts within a function.
Sadeq Dousti (243 rep)
Nov 18, 2014, 08:14 PM • Last activity: Mar 16, 2023, 11:37 AM
0 votes
1 answers
90 views
making query more efficient when there is a millions of row
My table consists of the following columns: job_id, event_type, timestamp, client_type, role_type, Every job_id has record of which event_type (example login, edit, delete) , what timestamp, which role did the event (system, master, agent) and which client it happened. My query is that I want to fin...
My table consists of the following columns: job_id, event_type, timestamp, client_type, role_type, Every job_id has record of which event_type (example login, edit, delete) , what timestamp, which role did the event (system, master, agent) and which client it happened. My query is that I want to find the list of job_id that DO NOT have a login event BUT have a DELETE event and acted by the system I tried a simple query using only one condition (have a loggedin event), but the DB times out/ lost connection. Is there anything I could do? SELECT job_id FROM table.events WHERE wa_id NOT IN (SELECT wa_id FROM table.events WHERE event_type = 'LoggedIn' ) AND role_type = 'MASTER' AND YEAR(timestamp) = '2023' AND platform_id = '1';
orrie881 (1 rep)
Jan 26, 2023, 08:44 AM • Last activity: Jan 26, 2023, 11:29 AM
5 votes
1 answers
13772 views
How to inquire about current value of MAX_EXECUTION_TIME
I understand that I can set the value of the global MAX_EXECUTION_TIME by running (from mysql client): SET GLOBAL MAX_EXECUTION_TIME But how do I just inquire its value? GET instead of SET does not seem to accomplish that.
I understand that I can set the value of the global MAX_EXECUTION_TIME by running (from mysql client): SET GLOBAL MAX_EXECUTION_TIME But how do I just inquire its value? GET instead of SET does not seem to accomplish that.
datsb (195 rep)
Feb 16, 2021, 10:34 AM • Last activity: Oct 6, 2022, 11:32 AM
3 votes
0 answers
342 views
Execution Plan changes between good and bad query plans (Azure SQL Server)
I've done my best to follow https://dba.stackexchange.com/questions/204565/why-is-my-query-suddenly-slower-than-it-was-yesterday The ShowPlanXML parses fine with SQL Sentry Plan Explorer but not via brentozar.com/pastetheplan (not sure why) so I have pasted text files to my github instead below: [He...
I've done my best to follow https://dba.stackexchange.com/questions/204565/why-is-my-query-suddenly-slower-than-it-was-yesterday The ShowPlanXML parses fine with SQL Sentry Plan Explorer but not via brentozar.com/pastetheplan (not sure why) so I have pasted text files to my github instead below: Here is the DDL and TSQL I am executing. Here is the bad query plan (times out). PasteThePlan Here is the good query plan. PasteThePlan Any idea how I can more reliably get the engine to use a "good" query plan? Thank you!
Vince (175 rep)
Jul 25, 2022, 03:49 PM • Last activity: Jul 25, 2022, 11:54 PM
0 votes
1 answers
628 views
SQL Server Timeout only on production
I have an API endpoint that runs a query. For some reason, when I hit the production endpoint the query times out (after 2 minutes) but when I hit the same endpoint locally with my local environment connected to the same production DB the query runs in a couple of seconds. Is there a reason why this...
I have an API endpoint that runs a query. For some reason, when I hit the production endpoint the query times out (after 2 minutes) but when I hit the same endpoint locally with my local environment connected to the same production DB the query runs in a couple of seconds. Is there a reason why this might happen? The issue is definitely not a connectivity issue because when I hit the same endpoint (on prod) with a different token it doesn't timeout. It's only some tokens that timeout on prod (yet when I run it locally connected to my prod DB it runs in a couple of seconds)
Moshe (67 rep)
May 5, 2022, 08:34 PM • Last activity: May 8, 2022, 05:03 AM
1 votes
0 answers
120 views
Can DST transitions cause "random" query timeouts?
I have encountered a query timeout ("Execution Timeout Expired") on a sub-second query on a connection set to 30 seconds timeouts. Client side logging indicated that 4 days elapsed between submitting the query and receiving the timeout. The client and the server were both running as part of the same...
I have encountered a query timeout ("Execution Timeout Expired") on a sub-second query on a connection set to 30 seconds timeouts. Client side logging indicated that 4 days elapsed between submitting the query and receiving the timeout. The client and the server were both running as part of the same virtual machine. The root cause was fairly evident: the virtual machine, having been suspended over several days, synchronized its system time via NTP and jumped 4 days ahead in time and the system time adjustment propagated to SQL Server just as it was executing the unfortunate query. However, this incident got us thinking. **Can transitions to daylight saving time cause random query timeouts, by spuriously adding 1 hour to the measured execution time of the query?** **Can other time zone changes cause random query timeouts?** I am hoping that SQL Server would use UTC timestamps to detect query timeouts and thus be unaffected by time zone changes. But I am unable to find any documentation to this effect.
Jirka Hanika (182 rep)
May 2, 2022, 09:04 AM • Last activity: May 2, 2022, 04:28 PM
8 votes
2 answers
23711 views
How to set statement timeout per user?
I have multiple users in Postgres. I would like to set up different statement timeouts for different users. Eg: Guest 5 minutes and Admin 10 minutes. Is it possible in Postgres 11.11?
I have multiple users in Postgres. I would like to set up different statement timeouts for different users. Eg: Guest 5 minutes and Admin 10 minutes. Is it possible in Postgres 11.11?
Dharanidhar Reddy (193 rep)
Apr 29, 2021, 11:03 AM • Last activity: Mar 13, 2022, 06:41 PM
0 votes
0 answers
659 views
Sql Job Failing with Timeout Error
Recently I have noticed that a job is failing on our Production 2014 SQL Server with this error text: > Timeout error [258]. [SQLSTATE 42000] (Error 258) OLE DB provider "SQLNCLI11" for linked server "LinkedTestServer01" returned message "Login timeout expired". [SQLSTATE 01000] (Error 7412) OLE DB...
Recently I have noticed that a job is failing on our Production 2014 SQL Server with this error text: > Timeout error . [SQLSTATE 42000] (Error 258) OLE DB provider "SQLNCLI11" for linked server "LinkedTestServer01" returned message "Login timeout expired". [SQLSTATE 01000] (Error 7412) OLE DB provider "SQLNCLI11" for linked server "LinkedTestServer01" returned message "Unable to complete login process due to delay in login response". [SQLSTATE 01000] (Error 7412). The step failed. The job fails during random times of the day and night. Sometimes even overnight (2am or 3am) - The connection timeout and remote query property in the linked server property is set to 0. - The Remote login Timeout property on the server itself is set to 10. - I have been monitoring the server using Activity Monitor and DMV queries and am not seeing any blocking or deadlocks. - There are no errors in windows event log or SQL error log that shows any timeout errors. - Index maintenance is running nightly and there are no index fragmentation in the corresponding databases. - There are no spikes in CPU. CPU does not go above 20% even during the busiest times of the days. - There are no memory issue. Memory stays at a steady 88%. In this scenario, what are the other ways I can find the root cause of this timeout error? If you have faced this situation before, what did you do to solve this issue?
sqllover2020 (73 rep)
Sep 24, 2021, 01:46 PM • Last activity: Sep 24, 2021, 02:43 PM
0 votes
1 answers
1009 views
Is there a way to determine the command timeout for an executing spid
Is there a DMV or other mechanism available that returns the command timeout for an executing session_id?
Is there a DMV or other mechanism available that returns the command timeout for an executing session_id?
SqlNightOwl (45 rep)
Jun 18, 2021, 04:50 PM • Last activity: Jun 18, 2021, 05:05 PM
4 votes
2 answers
2671 views
Timeout expired SqlException for complex Procedure
I use SQL Server 2008 R2 and ASP.NET 4.5. Sometimes, I get this error when I executed a complex procedure: > System.Data.SqlClient.SqlException > > Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding Any suggestions for troubleshooting or...
I use SQL Server 2008 R2 and ASP.NET 4.5. Sometimes, I get this error when I executed a complex procedure: > System.Data.SqlClient.SqlException > > Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding Any suggestions for troubleshooting or checklist (steps for improvements SQL)? My .NET code: return Translate(SqlDbHelper.ExecuteProcedure("SP_CalendarQuery", pfechaAlerta, pfechaAlertaFin, pAsunto, pidArea, pidTipoAlerta, pTomador, pidUsuarioConsulta, pCartera)); public static DataTable ExecuteProcedure(string sql, params SqlParameter[] listParams) { var dt = new DataTable(); using (var conn = new SqlConnection(ConnectionString)) { using (var command = new SqlCommand(sql, conn)) { command.CommandType = CommandType.StoredProcedure; command.Parameters.AddRange(listParams); using (var dataAdapter = new SqlDataAdapter(command)) { dataAdapter.Fill(dt); } } } return dt; } SQL Server Procedure: ALTER PROCEDURE [dbo].[SP_CalendarQuery] @DateStart datetime = NULL, @DateEnd datetime = NULL, @Subject varchar(1000) = NULL, @Area int = NULL, @TypeAlert int = NULL, @Tomador varchar(50) = NULL, @UserQuery int = NULL, @CarteraUserQueQuery int = null AS BEGIN DECLARE @intTypeRol INT DECLARE @intTypeMediador INT DECLARE @intTypeAsociacion INT IF @UserQuery IS NOT NULL begin SELECT @intTypeRol = FK_ID_ROL_PORTAL, @intTypeMediador = FK_ID_Type_MEDIADOR, @intTypeAsociacion = ASOCIACION FROM [AccessRoles.Users] WHERE FK_ID_DATOS_PERSONALES = @UserQuery END ELSE BEGIN SET @intTypeRol = NULL SET @intTypeMediador = NULL SET @intTypeAsociacion = NULL END SELECT C.[ID_Alert] ,C.[Empresa] ,C.[Subject] ,C.[Date_Start] ,C.[Date_End] ,C.[Detalle] ,C.[Numero_Referencia] ,C.[Vinculo] ,C.[FK_ID_UserPortal_Alta] ,C.[FK_ID_Origen_Datos] ,O.NOMBREORIGENDATOS ,C.[FK_ID_Area] ,A.DESCRIPCION_AREA_ACTUACION ,C.[FK_ID_Type_Alert] ,TA.NOMBRETypeAlert ,C.[FK_ID_Type_Referencia] ,TR.NOMBRETypeREFERENCIA ,C.[Ramo] ,C.[NombreTomador] ,C.[ApellidosTomador] ,C.[Date1] ,C.[Date2] ,'' as NombreUserAlta ,(SELECT COUNT(*) FROM [Calendar.Alerts_Leidas] WHERE FK_ID_Alert = C.ID_Alert AND CARTERA = ISNULL(@CarteraUserQueQuery,0)) AS LeidaUser ,(SELECT COUNT(ID_Adjunto) FROM [Calendar.Adjuntos] WHERE FK_ID_Alert = C.ID_Alert) AS NumeroAdjuntos ,(SELECT User FROM [Calendar.Alerts_Leidas] LEFT OUTER JOIN [AccessRoles.Datos_Personales] ON ID_DATOS_PERSONALES = FK_ID_UserPORTAL WHERE FK_ID_Alert = C.ID_Alert AND CARTERA = ISNULL(@CarteraUserQueQuery,0)) AS LeidaPor ,(SELECT Date_LECTURA FROM [Calendar.Alerts_Leidas] LEFT OUTER JOIN [AccessRoles.Datos_Personales] ON ID_DATOS_PERSONALES = FK_ID_UserPORTAL WHERE FK_ID_Alert = C.ID_Alert AND CARTERA = ISNULL(@CarteraUserQueQuery,0)) AS DateLectura ,(case ISNULL(@CarteraUserQueQuery,'') when '' then ISNULL(STUFF( (SELECT CAST(',' AS varchar(MAX)) + CARTERA FROM [Calendar.AlertsCarteras] WHERE FK_ID_Alert = ID_Alert FOR XML PATH('') ), 1, 1, ''), 'Todos') else convert(varchar, @CarteraUserQueQuery) end) as MEDIADORES_Alert ,STUFF( (SELECT CAST(',' AS varchar(MAX)) + Nombre FROM [Calendar.Adjuntos] WHERE FK_ID_Alert = ID_Alert FOR XML PATH('') ), 1, 1, '') As NombreAdjuntos ,C.Texto ,C.Texto2 ,C.SmsCliente ,C.InfoPoliza ,C.InfoMatricula ,C.InfoRecibo ,C.InfoSiniestro ,C.InfoNumeroLiquidacion ,C.Tomador FROM [dbo].[Calendar.Alerts] C LEFT OUTER JOIN [Calendar.Origen_Datos] O ON O.ID_ORIGEN_DATOS = C.FK_ID_Origen_Datos LEFT OUTER JOIN [AccessRoles.Area_Actuacion] A ON A.ID_AREA_ACTUACION = C.[FK_ID_Area] LEFT OUTER JOIN [Calendar.Type_Alert] TA ON TA.ID_Type_Alert = C.[FK_ID_Type_Alert] LEFT OUTER JOIN [Calendar.Type_Referencia] TR ON TR.ID_Type_REFERENCIA = C.[FK_ID_Type_Referencia] where --(@DateStart is null or convert(varchar,C.[Date_Start], 103) = convert(varchar,@DateStart,103)) (@DateStart IS NULL OR(C.[Date_End] IS NULL AND CONVERT(DATETIME, C.[Date_Start], 103) >= CONVERT(DATETIME, @DateStart, 103)) OR (C.[Date_End] IS NOT NULL AND CONVERT(DATETIME, @DateStart, 103) BETWEEN CONVERT(DATETIME, C.[Date_Start], 103) AND CONVERT(DATETIME, C.[Date_End], 103)) ) AND ( @DateEnd IS NULL OR ( (C.[Date_End] IS NULL AND CONVERT(DATETIME,CONVERT(VARCHAR, C.[Date_Start],103),103) 0) --las Alerts no contienen la restricción de rol portal o contienen su rol portal AND (@intTypeRol IS NULL OR ((SELECT COUNT(*) FROM [Calendar.AlertsRoles] ROL WHERE ROL.FK_ID_Alert = C.[ID_Alert] AND ROL.FK_TypeROLPORTAL IS NOT NULL) = 0 OR (SELECT COUNT(*) FROM [Calendar.AlertsRoles] ROL WHERE ROL.FK_ID_Alert = C.[ID_Alert] AND ROL.FK_TypeROLPORTAL = @intTypeRol) > 0)) ----las Alerts no contienen la restricción de Type mediador o contienen su Type mediador AND (@intTypeMediador IS NULL OR ((SELECT COUNT(*) FROM [Calendar.AlertsRoles] ROL WHERE ROL.FK_ID_Alert = C.[ID_Alert] AND ROL.FK_TypeMEDIADOR IS NOT NULL) = 0 OR (SELECT COUNT(*) FROM [Calendar.AlertsRoles] ROL WHERE ROL.FK_ID_Alert = C.[ID_Alert] AND ROL.FK_TypeMEDIADOR = @intTypeMediador) > 0 ) ) --------las Alerts no contienen la restricción de Type asociacion o contienen su Type asociacion AND ((@intTypeAsociacion IS NULL OR (SELECT COUNT(*) FROM [Calendar.AlertsRoles] ROL WHERE ROL.FK_ID_Alert = C.[ID_Alert] AND ROL.FK_TypeASOCIACION IS NOT NULL) = 0 OR (SELECT COUNT(*) FROM [Calendar.AlertsRoles] ROL WHERE ROL.FK_ID_Alert = C.[ID_Alert] AND ROL.FK_TypeASOCIACION = @intTypeAsociacion) > 0)) ) ) ORDER BY C.[Date_Start] DESC END
Kiquenet (155 rep)
Dec 3, 2015, 10:32 AM • Last activity: Apr 15, 2021, 12:31 PM
1 votes
4 answers
2420 views
How to quantify or locate command timeouts in Azure SQL
I am trying to if confirm query timeout in Azure. Our frontdoor is reporting a 503 response at 30 Seconds response, as its the SQL server default value, I am trying to confirm if these are indeed query command timeouts. I've searched for "Timeout" in the Logs section of the portal monitoring (not su...
I am trying to if confirm query timeout in Azure. Our frontdoor is reporting a 503 response at 30 Seconds response, as its the SQL server default value, I am trying to confirm if these are indeed query command timeouts. I've searched for "Timeout" in the Logs section of the portal monitoring (not sure this how they would be represented) Is there an method to locate query timeouts in Azure? Answers or links with a decent resource would be highly appreciated as my searches are not proving fruitful at the moment
DamagedGoods (2591 rep)
Jan 8, 2020, 12:58 PM • Last activity: Mar 29, 2021, 07:04 PM
1 votes
0 answers
3666 views
mysql - importing large Tablespace: Lost connection during query
iam trying to recover innodb table which has 1.5M rows from ibd file ( 5.5 GB ) this is the exact steps i do: 1. getting create table query using mysqlfrm command 2. create the table 3. Alter Table discard tablespace 4. moving the new tablespace to the db directory 5. Alter Table import tablespace;...
iam trying to recover innodb table which has 1.5M rows from ibd file ( 5.5 GB ) this is the exact steps i do: 1. getting create table query using mysqlfrm command 2. create the table 3. Alter Table discard tablespace 4. moving the new tablespace to the db directory 5. Alter Table import tablespace; and i'm getting this error after 5 minutes :- ERROR 2013 (HY000): Lost connection to MySQL server during query my.cnf: [client] port=3307 [mysql] no-beep [mysqld] max_allowed_packet=8M innodb_buffer_pool_size=511M innodb_log_file_size=500M innodb_log_buffer_size=800M net_read_timeout=28800 net_write_timeout=28800 connect_timeout=28800 wait_timeout=28800 open_files_limit=100000 innodb_open_files=100000 delayed_insert_timeout=28800 innodb_lock_wait_timeout=28800 slave_net_timeout=28800 skip-grant-tables port=3307 datadir=D:\dbrecover\_home_db_\home\db default-storage-engine=INNODB sql-mode="STRICT_TRANS_TABLES,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION" log-output=FILE general-log=0 general_log_file="WIN-36LFCDISVVC.log" slow-query-log=1 slow_query_log_file="WIN-36LFCDISVVC-slow.log" long_query_time=10 log-error="WIN-36LFCDISVVC.err" relay_log="WIN-36LFCDISVVC-relay" server-id=1 report_port=3307 lower_case_table_names=2 secure-file-priv="C:/ProgramData/MySQL/MySQL Server 5.7/Uploads" max_connections=151 table_open_cache=2000 tmp_table_size=123M thread_cache_size=10 myisam_max_sort_file_size=100G myisam_sort_buffer_size=236M key_buffer_size=8M read_buffer_size=64K read_rnd_buffer_size=256K innodb_flush_log_at_trx_commit=1 innodb_thread_concurrency=9 innodb_autoextend_increment=64 innodb_buffer_pool_instances=8 innodb_concurrency_tickets=5000 innodb_old_blocks_time=1000 innodb_open_files=300 innodb_stats_on_metadata=0 innodb_file_per_table=1 innodb_checksum_algorithm=0 back_log=80 flush_time=0 join_buffer_size=256K max_connect_errors=100 sort_buffer_size=256K table_definition_cache=1400 binlog_row_event_max_size=8K sync_master_info=10000 sync_relay_log=10000 sync_relay_log_info=10000 is there any way to import it ??
Amr Ahmed (11 rep)
Nov 3, 2019, 01:21 PM • Last activity: Mar 26, 2021, 06:14 AM
11 votes
2 answers
45264 views
Client times out, while MySQL query remains running?
We experienced an issue in which a read-only query, run through MySQL workbench, timed out from a user's UI perspective and remained running on the server (and apparently consuming more and more resources) until we had an outage. Questions - Is there a standard way to deal with this sort of issue in...
We experienced an issue in which a read-only query, run through MySQL workbench, timed out from a user's UI perspective and remained running on the server (and apparently consuming more and more resources) until we had an outage. Questions - Is there a standard way to deal with this sort of issue in MySQL? - Is there a fundamental cause that we need to avoid?
asthasr (243 rep)
Jan 12, 2012, 02:12 PM • Last activity: Feb 11, 2021, 01:29 PM
4 votes
2 answers
20448 views
Linked server returned message "Query timeout expired."
We have two separate SQL Servers. On one server we have a data warehouse (DWH), on the other we have sales information database. Now on the DWH server there is an ETL job that collects the information from the sales server. The job runs daily after midnight. The DWH collects the information via link...
We have two separate SQL Servers. On one server we have a data warehouse (DWH), on the other we have sales information database. Now on the DWH server there is an ETL job that collects the information from the sales server. The job runs daily after midnight. The DWH collects the information via linked server from the sales database. Now, the most time the ETL job runs without any problems. But sometimes it fails because of query timeout. We have found out, that there is a specific pattern: The failure happens every 11th day. So on the 11th day the ETL job fails to collect information. The following error occurs: > SQLNCLI11 for linked server “my linked server” returned message “Query timeout expired.” Note: The job fails usually 10 minutes after start. We have searched everything and could not found out what this issue causes. Also we know that the amount of data is every time, almost the same. Also there is no any scheduled job that runs all 11 days or something. The remote query timeout on the linked server is set to 0. Our next step will be, to turn off the antivirus programm on the sales server, to check if this causes the problem. Does anyone have any clue or idea, where i can search further to find the problem?
Leon (143 rep)
Apr 24, 2019, 12:49 PM • Last activity: Jul 21, 2020, 07:01 AM
13 votes
3 answers
30113 views
Tracking Down Application Timeout Errors in SQL Server
SQL Server 2008 SP3 How do I track down these timeout errors ? ![enter image description here][1] The errors are displayed on an intranet dashboard used specifically for error reporting in IIS. My suspicion is that there is a default timeout of 30 seconds in the web application and if a query takes...
SQL Server 2008 SP3 How do I track down these timeout errors ? enter image description here The errors are displayed on an intranet dashboard used specifically for error reporting in IIS. My suspicion is that there is a default timeout of 30 seconds in the web application and if a query takes more than thirty seconds, an exception is thrown. As there are many queries that take longer than 30 seconds on these SQL servers, I can't just filter in profiler based on duration. Serving up the website being monitored by this dashboard are two IIS servers retrieving data from seven SQL Server instances. Could I use the **"User Error Message Event"** and the **"OLEDB Errors Event"** to track these errors in SQL Server Profiler?
user4659
Oct 14, 2014, 03:51 PM • Last activity: Mar 10, 2020, 12:00 PM
2 votes
1 answers
1821 views
Catch OLE DB provider "SQLNCLI10" for linked server "[Some Server]" returned message "Query timeout expired"
**Without changing the settings on servers**, etc to the linked server connections, etc, is there a way to catch the dreaded? > "OLE DB provider "SQLNCLI10" for linked server "[Some Server here]" returned message "Query timeout expired"" > > "OLE DB provider "SQLNCLI11" for linked server "[Some Serv...
**Without changing the settings on servers**, etc to the linked server connections, etc, is there a way to catch the dreaded? > "OLE DB provider "SQLNCLI10" for linked server "[Some Server here]" returned message "Query timeout expired"" > > "OLE DB provider "SQLNCLI11" for linked server "[Some Server here]" returned message "Query timeout expired"" and either have the procedure retry to run or continue on to the next process in a cursor? We have a dynamic SQL Server system set up to call procedures based on a specific process we're running. This works fine but every once in a while, one of the steps will throw the above error and of course a traditional Try...Catch block doesn't capture it. I've searched for several hours on this and I need a way to be able to "capture" this error and either retry the procedure or skip the procedure but not exit the cursor (so go to the next process in line). We have a 2016 and a 2008 R2 servers communicating with each other. Right now we have a single cursor running with 20 such steps in it (we are trying to use this as a job task replacement) but eventually we will have 30 or 40 processes, with tasks totaling well into the hundreds using this system. Please let me know if you have any ideas.
Ron (21 rep)
Jun 3, 2019, 05:45 PM • Last activity: Sep 16, 2019, 04:02 PM
Showing page 1 of 20 total questions