Closed cs16lover closed 3 years ago
Maybe its related or not but from some research on internet some people thought it can be related about wait_timeout value:
SHOW global VARIABLES LIKE "wait_timeout";
+---------------+-------+
| Variable_name | Value |
+---------------+-------+
| wait_timeout | 600 |
+---------------+-------+
And some possible advices for solutions: https://www.percona.com/blog/2016/05/16/mysql-got-an-error-reading-communication-packet-errors/
@cs16lover I've let it for a very long time, but was unable to reproduce this behaviour. Do you have any other network issues (other Docker Compose stacks or on the host system)?
No. Its just mysql problem. I am accessing it through phpmyadmin and php-mysqli extension. Only it gave connection errors.
@cs16lover
I did some more digging on it and it seems to be a more general issue:
First of all, ensure that you have the latest MySQL/MariaDB/Percona images locally:
./update-docker.sh mysql
What I've taken from the reading are the following MySQL/MariaDB/Percona settings that you should give a try:
[mysqld]
skip-name-resolve
connect_timeout = 600
net_read_timeout = 600
net_write_timeout = 600
max_allowed_packet = 256M
Here is how to configure the above settings: https://devilbox.readthedocs.io/en/latest/configuration-files/my-cnf.html
Afterwards, verify in web interface that those are actually applied: http://localhost/info_mysql.php
Please let me know how they work and I might add those as defaults.
I've updated mysql docker image, and also updates devilbox to git master version. Now I have a new problem (because of the new problem, I didn't have a chance to test mysql problem as its not coming up)
$ docker-compose up httpd php mysql
WARNING: The HOST_PATH_SSH_DIR variable is not set. Defaulting to a blank string.
Creating devilbox_bind_1 ... done
Creating devilbox_php_1 ... error
ERROR: for devilbox_php_1 Cannot create container for service php: create .: volume name is too short, names should be at least two alphanumeric characters
ERROR: for php Cannot create container for service php: create .: volume name is too short, names should be at least two alphanumeric characters
ERROR: Encountered errors while bringing up the project.
@cs16lover copy env-example
over to .env
there is a new option included that needs to be set.
https://devilbox.readthedocs.io/en/latest/maintenance/update-the-devilbox.html#keep-env-file-in-sync
@cs16lover have you managed to solve the issue? I'm also struggling with that problem and what's funny, in my case it was working fine and then it stopped suddenly. I didn't change any settings, nor did I update docker or mysql...
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
ISSUE TYPE
OS / ENVIRONMENT
SUMMARY
From time to time MySQL got timeout and stops responding. But after some time passes it again comes back.
STEPS TO REPRODUCE
docker-compose up httpd php mysql
EXPECTED BEHAVIOUR
It should work always.
ACTUAL BEHAVIOUR
[Warning] Aborted connection 42 to db: 'tbot' user: 'root' host: '172.16.238.10' (Got timeout reading communication packets)
OTHER INFORMATION
Start command
.env file
File and user permissions (Linux & MacOS)
logs: