JDBCException Packet for query is too large
search cancel

JDBCException Packet for query is too large


Article ID: 4765


Updated On:


CA API Gateway


The ssg logs are showing the following JDBC Exception on the CA API Gateway:

com.l7tech.server.policy.assertion.ServerAuditDetailAssertion: -4: Policy Fragment: LogSink 

com.l7tech.server.message: Message processed successfully 

org.hibernate.util.JDBCExceptionReporter: SQL Error: 0, SQLState: S1000 

org.hibernate.util.JDBCExceptionReporter: Packet for query is too large (58888888 > 33554432). You can change this value on the server by setting the max_allowed_packet' variable. 


Component: APIGTW


The 'Packet for query is too large' message would indicate that the size of the payload is responsible for the situation.

There is a maximum packet size of 32MB allowed in audit details.


This can be rectified globally by adjusting the setting in the following file: 

/etc/my.cnf - change max_allowed_packet to a value larger than 32MB.


In order to activate the change on the Gateway, it is required to stop ssg, restart mysql and thereafter start ssg.

Additional Information

The default value of MySQL 5.7 is 4MB. (https://dev.mysql.com/doc/refman/5.7/en/server-system-variables.html)