go-links icon indicating copy to clipboard operation
go-links copied to clipboard

Initial db migration failure causes trotto app to return 500 internal server error

Open kentoku24 opened this issue 4 years ago • 5 comments

The symptom and steps to reproduce:

  1. Launch trotto instance.
  2. Launch postgres instance.
  3. Trotto instance keeps returning 500 internal server error.

Root cause: When trotto app and postgres instance are written in one docker-compose file, both are launched almost simultaneously.

Solution: a: add health check to trotto instance, so it will eventually restarted, and DB migration after restart should success. b: add retry capability to the initial database migration process. c: inform users to make sure to launch database prior to trotto instance.

kentoku24 avatar Jan 20 '21 16:01 kentoku24