PacketTooBigException when running a sonar analysis

前端 未结 2 398
再見小時候
再見小時候 2021-01-04 18:24

When I try and run a sonar analysis I get this exception

com.mysql.jdbc.PacketTooBigException: Packet for query is too large (1807198 > 1048576). Y

2条回答
  •  醉梦人生
    2021-01-04 18:53

    I had a same issue however, we had a limitation where we could not change the MySQL server configuration (max_allowed_packet)

    I was able to get this working by changing the Client side jdbc URL configurations -> leaving the server config as is.

    jdbc:mysql://[dbhost]:[dbport]?useUnicode=true&rewriteBatchedStatements=true&characterEncoding=utf8&useServerPrepStmts=true&maxAllowedPacket=20000000&useSSL=false
    

    Check the mysql connector config reference here

    There is one more post on SO that talks abt Client side change in detail - check here

    Hope this helps!

提交回复
热议问题