Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SQLSTATE[HY000] [2002] Connection refused (Connection: mysql, SQL: select name, payload from `se... #2106

Closed
jobara opened this issue Jan 22, 2024 · 3 comments · Fixed by #2134 or #2082
Assignees
Labels
help wanted Extra attention is needed

Comments

@jobara
Copy link
Collaborator

jobara commented Jan 22, 2024

Illuminate\Database\QueryException

SQLSTATE[HY000] [2002] Connection refused (Connection: mysql, SQL: select name, payload from settings where group = general)

🎯 Illuminate\Database\Connection::runQueryCallback
📄 /vendor/laravel/framework/src/Illuminate/Database/Connection.php

820   }
821   
822*  throw new QueryException(
823       $this->getName(), $query, $this->prepareBindings($bindings), $e
824   );

Open in Flare

@marvinroman
Copy link
Contributor

@JureUrsic can you help me resolve the following error so we can have MySQL slow logging on the container?

Could not use /opt/bitnami/mysql/logs/mysqld.log for logging (error 2 - No such file or directory). Turning logging off for the server process. To turn it on again: fix the cause, then either restart the query logging by using "SET GLOBAL SLOW_QUERY_LOG=ON" or restart the MySQL server.

@jobara
Copy link
Collaborator Author

jobara commented Feb 9, 2024

See @marvinroman's comment #2131 (comment)

@jobara jobara added the help wanted Extra attention is needed label Feb 9, 2024
@jobara
Copy link
Collaborator Author

jobara commented Feb 9, 2024

As @marvinroman mentioned this occurs during a database reset. In particular we are seeing this on the dev site during the nightly refresh when the site is being hit by the health check. It's probably because the 503 error page returned when the site is in maintenance mode includes the footer. The footer populates contact information from the settings which are stored in the database. Of course during a database reset this table is dropped and recreated, hence the error.

A few possible solutions to try:

  • pre-render the 503 error page when going into maintenance mode
  • see if we can check the table's existence before trying to access the settings in the settings helper function
  • remove the footer from the 503 error page

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
3 participants