Statement Timeout

Note

This feature implementation is considered ALPHA quality.

Percona Server has implemented a statement timeout feature. This feature can be used to limit the query execution time by specifying the timeout value in the max_statement_time variable. After the specified number of miliseconds is reached the server will attempt to abort the statement and return the following error to the client:

ERROR 1877 (70101): Query execution was interrupted, max_statement_time exceeded

Version Specific Information

  • 5.6.13-61.0: Statement timeout implemented. This feature with some changes was ported from Twitter MySQL patches.

System Variables

variable max_statement_time
Version Info:
Command Line:

Yes

Config File:

Yes

Scope:

Global, Session

Dynamic:

Yes

Variable Type:

Numeric

Values:

0 - 18446744073709551615

Default Value:

0 (no timeout is enforced)

Units:

milisecond

This system variable is used to specify the maximum execution time for any statement. After specified number of miliseconds is reached server will attempt to abort the statement.

variable have_statement_timeout
Version Info:
Command Line:

Yes

Config File:

Yes

Scope:

Global

Dynamic:

No

Variable Type:

Boolean

Values:

YES/NO

This system variable shows if the feature is supported for the current operating system.

Status Variables

variable Max_statement_time_exceeded
Version Info:
Scope:

Global

Type:

Numeric

This status variable shows the number of statements that exceeded execution time limit.

variable Max_statement_time_set
Version Info:
Scope:

Global

Type:

Numeric

This status variable shows the number of statements for which execution time limit was set.

variable Max_statement_time_set_failed
Version Info:
Scope:

Global

Type:

Numeric

This status variable shows the number of statements for which execution time limit could not be set, that can happen if some OS-related limits were exceeded.

Percona Server
Call Us
+1-888-316-9775 (USA - Sales)
+1-208-473-2904 (USA - Sales)
+44-208-133-0309 (UK - Sales)
0-800-051-8984 (UK - Sales)
0-800-181-0665 (GER - Sales)
+1-877-862-4316 (Emergency)
+1-855-55TRAIN (Training)
+1-925-271-5054 (Training)

Table Of Contents

Previous topic

Log Archiving for XtraDB

Next topic

Backup Locks

This Page



© Copyright Percona LLC and/or its affiliates 2009-2014.
Except where otherwise noted, this documentation is licensed under the following license:
CC Attribution-ShareAlike 2.0 Generic
Created using Sphinx 1.2.2.
This documentation is developed in Launchpad as part of the Percona Server source code.
If you spotted innacuracies, errors, don't understood it or you think something is missing or should be improved, please file a bug.
]]>