Logstash MySQL pakcet too large exception

I'm trying to retreive data from a remote MySQL Server through the 22 port and i receive this error:

[ERROR] 2022-06-29 15:21:37.081 [[main]<jdbc] jdbc - Unable to connect to database. Tried 0 times {:error_message=>"Java::ComMysqlJdbc::PacketTooBigException: Packet for query is too large (4739923 > 1048576). You can change this value on the server by setting the max_allowed_packet' variable."}
[ERROR] 2022-06-29 15:21:37.095 [[main]<jdbc] javapipeline - A plugin had an unrecoverable error. Will restart this plugin.

The query is with LIMIT 1 so i don't understande where is the size problem

MySQL is set max_allowed_packet limited to 1048576. Set a larger value like 10485760.
$> mysql --max_allowed_packet=10M

So, it's a MySQL problem?
I don't need to change settings on Logstash?

Yes, only MySQL side. Nothing on the LS side.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.