2. "Could not connect to server." This warning notice appears on a web page as users are editing a page.
3. A pop-up notice appears stating, "dbconnectionfails" (no screenshot provided). This pop-up can be closed and users can continue on normally.
Server details:
- Moodle 3.10:
- CentOS 6.10
- Apache 2.4.46
- PHP 7.2.34
- MySQL 5.7.32
- Operating System Linux/CentOS
- Hosting via Bluehost VPS
Moodle server check
config.php
MySQL log
2020-12-13T00:30:01.590956Z 20681 [Note] Got an error reading communication packets
2020-12-13T02:49:32.508568Z 21047 [Warning] Host name 'zg-0915b-92.stretchoid.com' could not be resolved:
Name or service not known
2020-12-13T03:36:07.858565Z 21162 [Note] Got an error reading communication packets
2020-12-13T04:30:02.004580Z 21298 [Note] Got an error reading communication packets
2020-12-13T07:06:08.691620Z 21680 [Warning] IP address '89.248.169.12' could not be resolved:
Temporary failure in name resolution
2020-12-13T07:40:11.441514Z 21766 [Note] Got an error reading communication packets
2020-12-13T08:30:01.641797Z 21892 [Note] Got an error reading communication packets
2020-12-13T09:25:35.334688Z 22029 [Warning] IP address '139.59.59.68' could not be resolved:
Name or service not known
2020-12-13T09:25:45.478482Z 22030 [Warning] IP address '190.144.55.6' could not be resolved:
Name or service not known
2020-12-13T11:40:59.907882Z 22359 [Note] Got an error reading communication packets
2020-12-13T12:30:02.066380Z 22476 [Note] Got an error reading communication packets
2020-12-13T13:53:07.812379Z 22682 [Warning] IP address '188.166.125.36' could not be resolved:
Name or service not known
2020-12-13T15:10:08.271476Z 22878 [Warning] IP address '83.97.20.31' has been resolved
to the host name '31.20.97.83.ro.ovo.sc', which resembles IPv4-address itself.
2020-12-13T15:42:13.853217Z 22953 [Note] Got an error reading communication packets
2020-12-13T16:03:41.688753Z 23092 [Warning] Host name '107-175-61-178-host.colocrossing.com'
could not be resolved: Name or service not known
2020-12-13T16:30:01.160697Z 23301 [Note] Got an error reading communication packets
2020-12-13T16:37:21.232994Z 23351 [Warning] Hostname 'rederatural.com' does not resolve to '104.140.188.2'.
2020-12-13T16:37:21.233275Z 23351 [Note] Hostname 'rederatural.com' has the following IP addresses:
2020-12-13T16:37:21.233288Z 23351 [Note] - 23.82.12.32
2020-12-13T19:43:40.917874Z 23855 [Note] Got an error reading communication packets
2020-12-13T20:30:01.352053Z 24058 [Note] Got an error reading communication packets
RTFM
- Error: database connection failed
- Suggestion, "Your database server isn't installed or running."
- Not relevant: database is running as error only occurs intermittently
- Suggestion, "If you are attempting to run two instances of Moodle on different ports..,"
- Not relevant: only running one instance.
- Suggestion, "You don't have the PHP mysql or postgresql extensions installed..."
- Not relevant, per above server checks, Moodle admin panel reports, "Status OK" with all PHP extensions installed.
- Suggestion, "You haven't created a Moodle database and assigned a user with the correct privileges to access it."
- Not relevant, as the database is accessible and running with only intermittent errors reporting.
- Suggestion, "The Moodle database settings are incorrect..."
- Possible. The file config.php was created from the template file config-dist.php provided with the installation. While the connection to the database must be defined properly (as the database is accessible with only intermittent errors), other critical settings may not be defined appropriately. I do not know what those settings might be.
- Suggestion, "Check that there are no apostrophes or non-alphabetic letters in your MySQL username or password."
- Not relevant, again the error message is only occurring intermittently, so the issues related to access (path, db name, user, password) are not the issue.
- Suggestion, "You are using MySQL version 4.1 or higher but the PHP MySQL extension is pre-4.1..."
- Not relevant, as errors are intermittent. The expectation would be that any access/config errors would affect all access to MySQL, not just occasional access. Also, as this is a new install, I would not expect any conflicts with extensions pre PHP Version 7.4.13 (the only version used with this installation).
- Not relevant, as errors are intermittent. The expectation would be that any access/config errors would affect all access to MySQL, not just occasional access. Also, as this is a new install, I would not expect any conflicts with extensions pre PHP Version 7.4.13 (the only version used with this installation).
- You are using Fedora core 3 or some other Linux system with SELinux installed and enabled.
- Not relevant, running "sestatus" reveals: "SELinux status: disabled"
- Suggested, "Mac OSX users..."
- Not relevant, running CentOS.
- Suggestion, "Your database server isn't installed or running."
- Moodle forum posts, including:
Any suggestions very much appreciated.
Thanks,
Patrick