TiDB Insertion Exception: Entry Too Large, the Max Entry Size is 6291456, the Size of Data is 7254170

Note:
This topic has been translated from a Chinese forum by GPT and might contain errors.

Original topic: Tidb插入异常:entry too large, the max entry size is 6291456, the size of data is 7254170

| username: heming

[TiDB Usage Environment] Production Environment
[TiDB Version]
6.1.2
[Reproduction Path] What operations were performed to cause the issue

[Encountered Issue: Problem Phenomenon and Impact]

SQL: INSERT INTO report_v2 (report_define_id, old_value, old_json, new_json, user_id, create_time) VALUES (?, ?, ?, ?, ?, ?)

Cause: java.sql.SQLException: entry too large, the max entry size is 6291456, the size of data is 7254170

2023-03-23 14:34:44.498 ERROR 19336 — [nio-8081-exec-9] o.a.c.c.C.[.[.[/].[dispatcherServlet] : Servlet.service() for servlet [dispatcherServlet] in context with path threw exception [Request processing failed; nested exception is org.apache.ibatis.exceptions.PersistenceException:

Error updating database. Cause: java.sql.SQLException: entry too large, the max entry size is 6291456, the size of data is 7254170

[Resource Configuration]
[Attachments: Screenshots/Logs/Monitoring]

| username: 沈阳盛京征信有限公司 | Original post link

Take a look at the txn-entry-size-limit parameter. This parameter was introduced starting from version v5.0, with a default value of 6291456 (in bytes) and a maximum value not exceeding 125829120 (which is 120MB). For more detailed information, please refer to the official documentation: txn-entry-size-limit

| username: TiDBer_jYQINSnf | Original post link

Make good use of search.

| username: heming | Original post link

show config where type=‘tidb’ and name like ‘%txn-entry-size-limit’;
±-----±-------------------±---------------------------------±--------+
| Type | Instance | Name | Value |
±-----±-------------------±---------------------------------±--------+
| tidb | xxx.xx.17.12:4000 | performance.txn-entry-size-limit | 6291456 |
| tidb | xxx.xx.17.87:4000 | performance.txn-entry-size-limit | 6291456 |

| username: tidb菜鸟一只 | Original post link

Set it a bit larger.

| username: heming | Original post link

Is it a static parameter? Can it only take effect by modifying the TiDB configuration file and restarting?
(user: time: 15:40) [db: (none)] set config tidb performance.txn-entry-size-limit=125829120;
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your TiDB version for the right syntax to use line 1 column 48 near “limit=125829120”

| username: 考试没答案 | Original post link

This is a grammatical error.

| username: heming | Original post link

(user: time: 15:51)[db: (none)]set config tidb performance.txn-entry-size-limit=125829120;
ERROR 1105 (HY000): TiDB doesn’t support changing configs online, please use SQL variables

| username: heming | Original post link

I didn’t find txn-entry-size-limit here.

I will upgrade to 6.1.5 in a few days and then restart TiDB with the parameter changes. Thank you, everyone.

| username: 胡杨树旁 | Original post link

Is this parameter modified in the configuration file, and then the corresponding node is restarted?

| username: heming | Original post link

Right, it cannot be modified dynamically.

| username: 沈阳盛京征信有限公司 | Original post link

TiDB’s configuration of various parameters is somewhat confusing compared to other databases.

| username: Jellybean | Original post link

Generally, configuration parameters that do not involve underlying data writing and reorganization are currently supported for online adjustment in TiDB. For configurations that require a cluster restart, it indicates that a restart is indeed necessary, possibly requiring data modification and reorganization, which may affect subsequent write and data access operations.

| username: system | Original post link

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.