ERROR 1180 (HY000): Got error 5 "Input/output error" during COMMIT

MariaDB [(none)]> select * from information_schema.GLOBAL_status where variable_name in ('wsrep_provider_name','wsrep_provider_version') union all select * from information_schema.GLOBAL_VARIABLES where variable_name in ('version','innodb_version') ;
+------------------------+-----------------------+
| VARIABLE_NAME          | VARIABLE_VALUE        |
+------------------------+-----------------------+
| WSREP_PROVIDER_NAME    | Galera                |
| WSREP_PROVIDER_VERSION | 25.3.23(r3789)        |
| VERSION                | 10.0.35-MariaDB-wsrep |
| INNODB_VERSION         | 5.6.39-83.1           |
+------------------------+-----------------------+
4 rows in set (0.00 sec)

一个业务插入数据时,报如下错误

MariaDB [test]> insert into mgc(c1,c2)  select c1,c2 from mgc;               
**ERROR 1180 (HY000): Got error 5 "Input/output error" during COMMIT**

错误日志中出现如下错误:

[Warning] WSREP: transaction size limit (65536) exceeded: 98304
[ERROR] WSREP: Failed to write buffer of length 0 to '/data/GRA_2465_-1.log'
[ERROR] WSREP: rbr write fail, data_len: 0, 2

由于在Galera Cluster集群中大的事务会影响整个集群的性能,因此我们限制了单个事务的大小。
调整repl.max_ws_size为128M后,sql能正常执行。

MariaDB [test]> set global wsrep_provider_options="repl.max_ws_size=134217728";
Query OK, 0 rows affected (0.02 sec)

MariaDB [test]> insert into mgc(c1,c2)  select c1,c2 from mgc;
Query OK, 5242880 rows affected (3 min 15.78 sec)
Records: 5242880  Duplicates: 0  Warnings: 0

日志中出现创建gcache.page。说明gcache不够用了。
[Note] WSREP: Created page /data/gcache.page.000000 of size 134217728 bytes

关于wsrep_max_ws_size的含义参考:
https://mariadb.com/kb/en/library/galera-cluster-system-variables/#wsrep_max_ws_size

Description: Maximum permitted size in bytes per writeset. Writesets exceeding this will be rejected. Note that versions from and before MariaDB 10.1.17 and MariaDB Galera 10.0.27 permitted the maximum to be set beyond 2GB, which was rejected by Galera.
Commandline: --wsrep-max-ws-size=#
Scope: Global
Dynamic: Yes
Data Type: Numeric
Default Value:
2147483647 (2GB, >= MariaDB Galera 10.0.27, MariaDB 10.1.17)
1073741824 (1GB, <= MariaDB Galera 10.0.26, MariaDB 10.1.16)
Range: 1024 to 2147483647
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值