Cause: com.mysql.jdbc.PacketTooBigException: Packet for query is too large (16944839 > 16777216). You can change this value on the server by setting the max_allowed_packet' variable.
今天发现task微服务的error日志报如下错误:
Cause: com.mysql.jdbc.PacketTooBigException: Packet for query is too large (16944839 > 16777216). You can change this value on the server by setting the max_allowed_packet' variable.
网上查了一下说要设置 max_allowed_packet 但是我查了一下现在已经是100M了
show variables like '%max_allowed_packet%'
然后我重启mysql和重启task微服务还是报这个错,后来又有个文章说要设置 mysql 连接的url 加上
&useServerPrepStmts=true&maxAllowedPacket=104857600
然后我重启了task微服务又报另外一个错,如下
2019-11-08 12:53:19.580 pool-9-thread-25 ERROR com.hp.nova.common.tasksync.tcscheduler.TcFileProcessScheduleJob.fileProcessCronJob(TcFileProcessScheduleJob.java:354) - org.mybatis.spring.MyBatisSystemException: nested exception is org.apache.ibatis.type.TypeException: Could not set parameters for mapping: ParameterMapping{property='__frch_i_8241.stepStatus', mode=IN, javaType=class java.lang.Integer, jdbcType=null, numericScale=null, resultMapId='null', jdbcTypeName='null', expression='null'}. Cause: org.apache.ibatis.type.TypeException: Error setting non null for parameter #24726 with JdbcType null . Try setting a different JdbcType for this parameter or a different configuration property. Cause: java.sql.SQLException: Parameter index out of bounds. 24726 is not between valid values of 1 and 24725
如果改成只加如下一个配置,就还是不生效
maxAllowedPacket=104857600
后面没办法没找到原因为什么max allowed packet设置了task微服务还是报错不能超过16M,后面只能修改了源代码把批量update的语句改成了每1000条update一次解决了问题
Cause: com.mysql.jdbc.PacketTooBigException: Packet for query is too large (16944839 > 16777216). You can change this value on the server by setting the max_allowed_packet' variable.的更多相关文章
- Linux服务器上日志报com.mysql.jdbc.PacketTooBigException: Packet for query is too large (1783 > 1024). You can change this value on the server by setting the max_allowed_packet' variable.
在做查询数据库操作时,报了以上错误,还有out of memery heap hacp ,原因是MySQL的max_allowed_packet设置过小引起的,我一开始设置的是1M,后来改为了20M ...
- com.mysql.jdbc.PacketTooBigException: Packet for query is too large (1680 > 1024). You can change this value on the server by setting the max_allowed_packet' variable.
这个错误是由于mysql的一个系统参数max_allowed_packet设置的值过小引起的 解决这个错误的方法就是修改这个参数的值, linux系统中我们在etc目录下找到my.cnf这个文件,打开 ...
- 问题: Packet for query is too large (1786 > 1024). You can change this value on the server by setting the max_allowed_packet' variable.
错误描述: 今天在手机端查看之前上线的项目时,突然报了下面的错误.再之后用电脑登陆,其他设备登陆都一直报这个错误. 错误信息: ### Error querying database. Cause: ...
- MYSQL Packet for query is too large (12054240 > 4194304). You can change this value on the server by setting the max_allowed_packet' variable.
MYSQL Packet for query is too large (12054240 > 4194304). You can change this value on the server ...
- 服务器的日志一直报Packet for query is too large (7632997 > 4194304). You can change this value on the server by setting the max_allowed_packet' variable.的解决方法
服务器的日志一直报Packet for query is too large (7632997 > 4194304). You can change this value on the serv ...
- Mysql报错:Packet for query is too large (1121604 > 1048576).You can change this value on the server by setting the max_allowed_packet variable
看错误信息,发现1048576个字节,正好是1*1024*1024byte,也就是1Mb. 这正是mysql默认的max_allowed_packet值. 使用sql语句: show VARIABLE ...
- mysql Packet for query is too large (2036 > 1024). You can change this value on the server by setting the max_allowed_packet' variable.
解决方法: 打开控制台,输入下面语句,执行 set global max_allowed_packet = 20*1024*1024; 网上说要重启 mysql server, 我是执行完后不用重启就 ...
- Packet for query is too large (1660 > 1024). You can change this value on the server by setting the max_allowed_packet' variable.
原因是mysql 默认允许的 数据报包 是 1M 设置大一些就可以了 centos 下面 /ect/my.cnf 文件里面 加入或者修改 下面的参数 [mysqld] max_allowed_pa ...
- nested exception is com.mysql.jdbc.PacketTooBigException: Packet for query is too large (1044 > 1024
HTTP Status 500 - type Exception report message description The server encountered an internal error ...
随机推荐
- MySql 里的IFNULL用法
IFNULL(expr1,expr2)的用法: 假如expr1 不为 NULL,则 IFNULL() 的返回值为 expr1; 否则其返回值为expr2.IFNULL()的返回值是数字或是字符串,具体 ...
- 30 Flutter自定义Dialog
MyDialog.dart import 'dart:async'; import 'package:flutter/material.dart'; class MyDialog extends Di ...
- Mysql读写分离(Mycat版)
(1).读写分离概述 1)工作原理 读写分离是让主数据库处理事务性增删改操作(insert.delete.update),让从数据库处理查询查询操作(select). 2)作用 1.分担负载 2.主从 ...
- tensorflow学习 从入门到实战(转)
原文作者:zhaozhengcoder链接:https://www.jianshu.com/p/27a2fb320934來源:简书简书著作权归作者所有,任何形式的转载都请联系作者获得授权并注明出处. ...
- Java遍历日期代码
import java.util.ArrayList; import java.util.List; public class DateTraveller { public static List&l ...
- C#6.0-8.0新功能、ValueTuple
C# 6.0: https://www.cnblogs.com/yinrq/p/5600530.html C# 7.0: https://www.cnblogs.com/cncc/p/7698543. ...
- C/C++查漏补缺(常更)
一.#define宏定义 如下程序段,则输出结果为: #define MAX 12 int main(){ cout << "20\0MAX019" << ...
- 【转载】Globelmposter勒索病毒最新变种预警
近日,深信服安全团队观察到Globelmposter勒索病毒又出现最新变种,加密后缀有Ares666.Zeus666.Aphrodite666.Apollon666等,目前国内已有多家大型医院率先发现 ...
- 跨域及jsonp
什么是跨域? 要解释跨域,就要先说明下什么是域?域的英文名是Domain,百度百科给的定义是: 域(Domain)是Windows网络中独立运行的单位,域之间相互访问则需要建立信任关系(即Trust ...
- iOS-AES算法总结
AESCipher.h #import <Foundation/Foundation.h> @interface AESCipher : NSObject /** 加密算法 @param ...