背景:mysql
今天在項目根目錄執行maven sonar:sonar ,報錯信息以下,而後就各類的搜,折騰了多半每天也沒找出解決辦法,最後打算放棄時,看到一遍文章說是mysql max_allowed_packet 的問題git
Failed to execute goal org.sonarsource.scanner.maven:sonar-maven-plugin:3.4.0.905:sonar (default-cli) on project air_order_mis_new_git: Failed to upload report - 500: An error has occurred. Please contact your administrator -> [Help 1]sql
二、解決方法:maven
mysql客戶端命令行執行spa
set
global
max_allowed_packet = 100*1024*1024;
命令行
show VARIABLES like '%max_allowed_packet%’; 查看 max_allowed_packet收更新成功code
最後問題解決server
三、max_allowed_packet是幹嗎的呢?it
原來是控制server接受數據包的大小,有時大量的插入數據會因max_allowed_packet參數限制,而致使寫入失敗class
當時就往maven 配置 sonar配置上想了,怎麼就沒想到mysql呢?