accessibility-exchange / platform

The Accessibility Exchange platform.
https://github.com/orgs/accessibility-exchange/projects/2/views/8
BSD 3-Clause "New" or "Revised" License
4 stars 10 forks source link

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

Closed jobara closed 7 months ago

jobara commented 7 months ago

Illuminate\Database\QueryException

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

:dart: Illuminate\Database\Connection::runQueryCallback :page_facing_up: /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 commented 7 months ago

@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 commented 7 months ago

See @marvinroman's comment https://github.com/accessibility-exchange/platform/issues/2131#issuecomment-1935050549

jobara commented 7 months ago

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: