SQLSTATE[HY000]: General error: 2006 MySQL server has gone away

Nid: 920

Drupal の Feeds Import で、2万件のjsonデータをプレビューすると以下のエラー。

Additional uncaught exception thrown while handling exception.
Original

PDOException: SQLSTATE[HY000]: General error: 2006 MySQL server has gone away: SELECT count(*) FROM {feeds_item} WHERE id = :id AND entity_type = :entity_type AND feed_nid = :feed_nid; Array ( [:id] => tour_spot [:entity_type] => node [:feed_nid] => 0 ) in FeedsProcessor->itemCount() (line 641 of /var/www/html/example.com/sites/all/modules/feeds/plugins/FeedsProcessor.inc).
Additional

PDOException: SQLSTATE[HY000]: General error: 2006 MySQL server has gone away: SELECT 1 AS expression FROM {variable} variable WHERE ( (name = :db_condition_placeholder_0) ); Array ( [:db_condition_placeholder_0] => drupal_css_cache_files ) in variable_set() (line 1240 of /var/www/html/example.com/includes/bootstrap.inc).

MySQLを設定変更して解決。

$ sudo vim /etc/mysql/mariadb.conf.d/50-server.cnf
max_allowed_packet=128M
$ sudo systemctl restart mysql