Packet for query is too large(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",(可能有些文件会没有这一行的)
格式为:
[mysqld]
max_allowed_packet = 1M( 将1M更改为4M(如果没有这行内容,增加一行)),
保存,
重起MySQL服务。
mysql服务停止:service mysql stop
mysql服务启动: service mysql start
mysql服务重启: service mysql restart
现在可以load大于1M的文件了
posted on 2013-08-01 15:00 阳光总在风雨后001 阅读(506) 评论(0) 编辑 收藏 举报