I have mysql server going away on a simple select query, the error is:
SQLSTATE[HY000]: General error: 2006 MySQL server has gone away, query was: SELECT `main_table`.* FROM `sales_flat_order` AS `main_table` WHERE (`increment_id` LIKE '%0005254')
This query is cron-scheduled and executed every 5 mins. If I restart the mysql server, the query is executing normally for a day and then starts crashing again.
I thought it's RAM-related, but I have plenty of RAM on the server:
The MySql version is 5.7.17 on Ubuntu 14.04.5 LTS
There are no errors neither in /var/log/mysql/errors.log nor in syslog
Some other configs:
max_allowed_packet = 256M
innodb_buffer_pool_size = 2G
Do you have any idea what it can be?