Back

[SOLVED] Fatal Error on appwrite stack

  • 1
  • Self Hosted
  • General
  • Web
jadechessink
21 Feb, 2023, 21:32

Hello all, my appwrite stack no longer starts up and the appwrite container spits out the following error when spinning up workers and then reboots: [2023-02-21 21:26:10 #1.4] ERROR php_swoole_server_rshutdown() (ERRNO 503): Fatal error: Uncaught TypeError: Swoole\Database\PDOConfig::withPort(): Argument #1 ($port) must be of type int, string given, called in /usr/src/code/app/init.php on line 510 and defined in @swoole-src/library/core/Database/PDOConfig.php:82 Stack trace: #0 /usr/src/code/app/init.php(510): Swoole\Database\PDOConfig->withPort('') #1 /usr/src/code/vendor/utopia-php/registry/src/Registry/Registry.php(75): {closure}() #2 /usr/src/code/app/http.php(70): Utopia\Registry\Registry->get('dbPool') #3 {main} thrown in @swoole-src/library/core/Database/PDOConfig.php on line 82

Appwrite version: appwrite/appwrite:1.1.2

any assistance will be greatly appreciated.

TL;DR
The appwrite stack was experiencing a fatal error and would not start up. The error message indicated that there was a type error related to the database port. The solution was to check if `_APP_DB_PORT` was set correctly in the .env file. Additionally, it was mentioned that the entire ENV file went missing. The issue was resolved by restoring from a backup.
Drake
21 Feb, 2023, 21:47

Seems like the DB port might be missing. Do you have _APP_DB_PORT set in your .env file?

jadechessink
21 Feb, 2023, 21:55

more than that, the entire ENV file went missing somehow

jadechessink
21 Feb, 2023, 21:55

i restored from backup and now its working, thank you for pointing me in the correct direction.

jadechessink
21 Feb, 2023, 21:56

[SOLVED] Fatal Error on appwrite stack

VincentGe
21 Feb, 2023, 23:05

Remember to have backups! And don't track this file in Git!

Reply

Reply to this thread by joining our Discord

Reply on Discord

Need support?

Join our Discord

Get community support by joining our Discord server.

Join Discord

Get premium support

Join Appwrite Pro and get email support from our team.

Learn more