upleveled / next-js-example-fall-2023-atvie

https://next-js-example-fall-2023-vienna-austria.fly.dev/
2 stars 2 forks source link

Fix PostgreSQL v16 Fly.io lock file creation error #27

Closed ProchaLu closed 9 months ago

ProchaLu commented 9 months ago

Closes https://github.com/upleveled/next-js-example-fall-2023-atvie/issues/17

Description

During the update for Fly.io to PostgreSQL v16, an issue occurred where the unix_socket_directories setting was commented out by the PostgreSQL upgrade process. This caused the deployment to fail as the lock file could not be created.

2023-12-18T16:29:12.740 app[3d8d9297b96748] otp [info] 2023-12-18 16:29:12.739 UTC [330] FATAL: could not create lock file "/run/postgresql/.s.PGSQL.5432.lock": No such file or directory

The issue has been resolved by uncommenting the unix_socket_directories setting using sed. This ensures that PostgreSQL correctly identifies the location of the socket files for connecting to the database.