When launching my web app I get a 500 error. The prod.log shows a connection error to the database, and just below that there is a cache.WARNING: Failed to save key in the /var/www/project/var/cache folder. (Not sure if they are related.)
The error says getaddrinfo failed: Temporary failure in name resolution at /var/www/etc.
I've tried changing the configuration of the db connection string from localhost to 127.0.0.1 to the actual IP address and not seeing a difference.
doctrine:
dbal:
# configure these for your database server
driver: 'pdo_mysql'
server_version: '5.7'
charset: utf8mb4
default_table_options:
charset: utf8mb4
collate: utf8mb4_unicode_ci
url: '%env(resolve:DATABASE_URL)%'
.env DATABASE_URL=mysql://username:password@127.0.0.1:3306/atlas
I'm expecting the configuration to correctly identify the localhost or local ip address and connect to the db.