Go prepare statment exceeds MySQL max number

Source: Internet
Author: User

Mysql_stmt_prepare failed! Error (1461) Can ' t create more than Max_prepared_stmt_count statements (current value:16382)



The replies given are as follows:

The Max_prepared_stmt_count parameter limits the upper bound of the prepared statement in all sessions on mysqld at the same time.
It has a value range of "0-1048576" and defaults to 16382.
MySQL will report a 1461 error for prepare statements that exceed max_prepared_stmt_count. Debug statement:

Mysql> show global status like '%stmt% ';

+----------------------------+--------+

| variable_name | Value |

+----------------------------+--------+

| Binlog_stmt_cache_disk_use | 0 |

| Binlog_stmt_cache_use | 0 |

| Com_stmt_close | 142593 |

| Com_stmt_execute | 170302 |

| Com_stmt_fetch | 0 |

| Com_stmt_prepare | 157761 |

| Com_stmt_reprepare | 0 |

| Com_stmt_reset | 0 |

| Com_stmt_send_long_data | 0 |

| Prepared_stmt_count | 4 |

+----------------------------+--------+

Rows in Set (0.06 sec)

Mysql> set global max_prepared_stmt_count= 124000;
Query OK, 0 rows Affected (0.00 sec)

Go prepare statment exceeds MySQL max number

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.