Problem Sometimes we have experimented some issues when overcomes a set of installed modules: This is, when installing modules over the platform, it happens then that:
1- There is a moment when we lost the access to the path admin/modules and we can't see the list of modules, being redirect to the initial language select page.
2- In the path of the system site general report (/admin/reports/status/) appears a notice: "Undefined index: name in system_requirements() (line 53 of core/modules/system/system.install". It seems to be part of another issue, but not: it's directly related.
3- In the general report, in block "Checked" the item "Installation Profile and its info about the installation profile (oe_profile) is missing. Also seems to be part of another issue but is from the same issue.
4- In the path /admin/reports/dblog ("Recent log messages") appears a set of errors, warnings and issues that include some message about MySQL config limits (see the next caption).
Why? Interesting messages:
Drupal\Core\Database\DatabaseExceptionWrapper: SQLSTATE[HY000]: General error: 2006 MySQL server has gone away.
Warning: Error while sending QUERY packet. PID=69 in Drupal\Core\Database\Statement->execute().
Seems that the 'error while sending QUERY packet' problem is caused by a too-low setting of max_allowed_packet in MySQL config.
Solution
1- Connect to the MySQL - Percona Container:
docker-compose exec mysql /bin/bash
2- Connect to the mysql prompt and look for values:
mysql -uroot -p
mysql> SHOW VARIABLES;
3- Search params and values:
max_allowed_packet | 4194304
4- Change options:
mysqld --help --verbose
mysqladmin --help
Default options are read from the following files in the given order:
/etc/my.cnf /etc/mysql/my.cnf /usr/etc/my.cnf ~/.my.cnf
So open:
vi /etc/my.cnf
and put under [mysqld]:
max_allowed_packet=1G
Exit from vi (:wq!) and exit from the prompt of the container (exit).
5- Restart the Containers Network:
docker-compose stop
docker-compose up -d
And the new value will be setted. The issue acessing to /admin/modules will disappear.
6- Cache rebuild
Please, don't forget rebuild the cache in your Drupal - web container, in order to see all the former errors and problems going out ot your interface.
Launch:
Problem Sometimes we have experimented some issues when overcomes a set of installed modules: This is, when installing modules over the platform, it happens then that:
1- There is a moment when we lost the access to the path admin/modules and we can't see the list of modules, being redirect to the initial language select page.
2- In the path of the system site general report (/admin/reports/status/) appears a notice: "Undefined index: name in system_requirements() (line 53 of core/modules/system/system.install". It seems to be part of another issue, but not: it's directly related.
3- In the general report, in block "Checked" the item "Installation Profile and its info about the installation profile (oe_profile) is missing. Also seems to be part of another issue but is from the same issue.
4- In the path /admin/reports/dblog ("Recent log messages") appears a set of errors, warnings and issues that include some message about MySQL config limits (see the next caption).
Why? Interesting messages:
Drupal\Core\Database\DatabaseExceptionWrapper: SQLSTATE[HY000]: General error: 2006 MySQL server has gone away.
Warning: Error while sending QUERY packet. PID=69 in Drupal\Core\Database\Statement->execute(). Seems that the 'error while sending QUERY packet' problem is caused by a too-low setting of max_allowed_packet in MySQL config.
Solution
1- Connect to the MySQL - Percona Container:
2- Connect to the mysql prompt and look for values:
3- Search params and values:
max_allowed_packet | 4194304
4- Change options:
Default options are read from the following files in the given order: /etc/my.cnf /etc/mysql/my.cnf /usr/etc/my.cnf ~/.my.cnf
So open:
and put under [mysqld]:
Exit from vi (:wq!) and exit from the prompt of the container (exit).
5- Restart the Containers Network:
And the new value will be setted. The issue acessing to /admin/modules will disappear.
6- Cache rebuild Please, don't forget rebuild the cache in your Drupal - web container, in order to see all the former errors and problems going out ot your interface. Launch:
Don't forget about rebuild cache.