Skip to content

Retry initial database connection until it succeeds - #16

Merged
yungcomputerchair merged 7 commits into
yungcomputerchair:mainfrom
dongresource:wait-for-db
Apr 29, 2026
Merged

Retry initial database connection until it succeeds#16
yungcomputerchair merged 7 commits into
yungcomputerchair:mainfrom
dongresource:wait-for-db

Conversation

@dongresource

@dongresource dongresource commented Apr 11, 2026

Copy link
Copy Markdown
Collaborator

The initial DB connection now retries on a timer, allowing the login and shard servers to be started before the database.

  • Failure to reach the DB prints a simple, readable error message
  • Other DB connection errors like auth failures print more detailed error messages
  • Improved underlying error message extraction from errors on other DB operations as well

@dongresource
dongresource marked this pull request as ready for review April 28, 2026 20:32
@dongresource
dongresource marked this pull request as draft April 28, 2026 23:40
@dongresource

dongresource commented Apr 29, 2026

Copy link
Copy Markdown
Collaborator Author

Might want to look at the choices of error severity a bit closer to make sure they make sense. Especially with how Severity::Fatal is sometimes meant to terminate the server and other times not.

@dongresource
dongresource marked this pull request as ready for review April 29, 2026 00:03
@dongresource dongresource changed the title Retry initial database connection until it comes up Retry initial database connection until it succeeds Apr 29, 2026

@yungcomputerchair yungcomputerchair left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great, thanks

@yungcomputerchair
yungcomputerchair merged commit 1289826 into yungcomputerchair:main Apr 29, 2026
3 checks passed
dongresource added a commit that referenced this pull request Apr 29, 2026
The initial DB connection now retries on a timer, allowing the login and
shard servers to be started before the database.

* Failure to reach the DB prints a simple, readable error message
* Other DB connection errors like auth failures print more detailed
  error messages
* Improved underlying error message extraction from errors on other DB
  operations as well
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants