错误环境:activemq原本用文本文件存储队列中数据,当在activemq中改为用mysql中存储数据时,当向某队列中传输数据量过大,会报以下错误:
错误现象:org.springframework.jms.UncategorizedJmsException: Uncategorized exception occured during JMS processing; nested exception is javax.jms.JMSException: Packet for query is too large (2491451 > 1048576). You can change this value on the server by setting the max_allowed_packet' variable
解决办法:MySQL的一个系统参数:max_allowed_packet,其默认值为1048576(1M),
查询:show VARIABLES like '%max_allowed_packet%';
修改此变量的值:MySQL安装目录下的my.ini文件中的[mysqld]段中的"max_allowed_packet = 1M",如更改为4M(如果没有这行内容,增加一行),保存,重起MySQL服务。现在可以load大于1M的文件了
Packet for query is too large
最新推荐文章于 2023-12-25 13:32:43 发布