[PR #1306] [MERGED] fix: non-interactive database connection failures #1670

Closed
opened 2026-02-26 03:31:52 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/koel/koel/pull/1306
Author: @rburchell
Created: 4/14/2021
Status: Merged
Merged: 4/16/2021
Merged by: @phanan

Base: masterHead: master


📝 Commits (1)

  • 84703b6 fix: non-interactive database connection failures

📊 Changes

1 file changed (+29 additions, -2 deletions)

View changed files

📝 app/Console/Commands/InitCommand.php (+29 -2)

📄 Description

Two problems here:

  1. endlessly attempting to reconnect (with no interval between attempts)
    is a nightmare that will use resources and spam logs with no respite
  2. attempting to update the database credentials on a connection failure
    is definitely not the right thing to do, as they cannot be requested
    when non-interactive.

Problem 1 is not really an issue in interactive use, because the user
being asked for credentials will slow down the connection attempts.

Problem 2 could conceivably be a problem in interactive mode (if
there's some sort of transient connection failure), but if this is a
problem, it should perhaps be discussed & addressed separately.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/koel/koel/pull/1306 **Author:** [@rburchell](https://github.com/rburchell) **Created:** 4/14/2021 **Status:** ✅ Merged **Merged:** 4/16/2021 **Merged by:** [@phanan](https://github.com/phanan) **Base:** `master` ← **Head:** `master` --- ### 📝 Commits (1) - [`84703b6`](https://github.com/koel/koel/commit/84703b6afe1f948661743e550160791efc0c9f30) fix: non-interactive database connection failures ### 📊 Changes **1 file changed** (+29 additions, -2 deletions) <details> <summary>View changed files</summary> 📝 `app/Console/Commands/InitCommand.php` (+29 -2) </details> ### 📄 Description Two problems here: 1) endlessly attempting to reconnect (with no interval between attempts) is a nightmare that will use resources and spam logs with no respite 2) attempting to update the database credentials on a connection failure is definitely not the right thing to do, as they cannot be requested when non-interactive. Problem 1 is not really an issue in interactive use, because the user being asked for credentials will slow down the connection attempts. Problem 2 _could_ conceivably be a problem in interactive mode (if there's some sort of transient connection failure), but if this is a problem, it should perhaps be discussed & addressed separately. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-02-26 03:31:52 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/koel-koel#1670
No description provided.