Error establishing a database connection

The server returned HTTP 500 (Internal Server Error) while trying to reach the database.

What happened?

The application failed to open a connection to its primary database within the configured timeout. This can occur when the DB host is unreachable, credentials are invalid, or the pool has exhausted connections.

Correlation ID
DB-ERR-9F2A3C
Timestamp
2025-10-12T11:38:15-05:00
Environment
production

What can I do?

Technical details
DB Host
db-primary.internal:3306
DB User
app_user
SSL
required
Driver
mysqli

Exception

mysqli_sql_exception: SQLSTATE[HY000] [2002] Connection timed out
  at Database.connect (src/db/Connection.php:42)
  at Pool.acquire (src/db/Pool.php:88)
  at CompanyRepository->findById (src/repo/CompanyRepository.php:61)
  at CompaniesController->show (src/http/CompaniesController.php:39)
  at HttpKernel->handle (src/http/Kernel.php:127)

Last 3 connection attempts

[11:38:11] try #1 → db-primary.internal:3306 → timeout (2s)
[11:38:13] try #2 → db-primary.internal:3306 → timeout (2s)
[11:38:15] try #3 → db-primary.internal:3306 → timeout (2s)

If this persists, please contact support and include DB-ERR-9F2A3C.