gpt4 book ai didi

mysql - 当请求超过 4MB 时 SIGPIPE 崩溃

转载 作者:行者123 更新时间:2023-11-29 13:18:04 24 4
gpt4 key购买 nike

我使用 Xcode 3.2.1(由于某些原因我使用的是雪豹)和 mysql :

  • 服务器版本:5.6.15 MySQL 社区服务器 (GPL) +
  • mysql-connector-c-6.1.3-osx10.6-x86_64

我将请求传递给 mysql_query(),如下所示。

// mysql request
request = [NSString stringWithFormat:@"UPDATE consult SET summary='%@', pheno='%@' WHERE idConsult=%@", sum, phe, idc];

if (mysql_query(mysqlCnx,[request UTF8String])) {
db_finish_with_error(mysqlCnx);
}

当请求大小超过 4MB 时,我会收到一个带有以下堆栈跟踪的 SIGPIPE:

#0  0x7fff896d791e in sendto
#1 0x100065a92 in vio_write
#2 0x10004d2a2 in net_write_packet
#3 0x10004d3ac in net_write_buff
#4 0x10004d6e2 in net_write_command
#5 0x100048e3c in cli_advanced_command
#6 0x100046bdd in mysql_real_query
#7 0x1000093f9 in -[ConsultList mysqlUpdateResumePhenoFields:] at ConsultList.m:163
4#8 0x10000a565 in -[ConsultList okConsult:] at ConsultList.m:367

有任何已知问题吗?

最佳答案

解决方案如下:

/etc/my.cnf
[mysqld]
max_allowed_packet=120M

as root :
chown 644 /etc/my.cnf

mysql> set global max_allowed_packet = 125829120;
Query OK, 0 rows affected (0,00 sec)

mysql> show variables like 'max_allowed_packet';
+--------------------+-----------+
| Variable_name | Value |
+--------------------+-----------+
| max_allowed_packet | 125829120 | << 120MB !
+--------------------+-----------+

关于mysql - 当请求超过 4MB 时 SIGPIPE 崩溃,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/21217625/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com