DB Connection Issues #278

Closed
opened 2026-02-04 18:15:30 +03:00 by OVERLORD · 3 comments
Owner

Originally created by @Ethanb00 on GitHub (Feb 25, 2017).

  • BookStack Version: v0.14.3
  • PHP Version: PHP 7.0.13
  • MySQL Version: mysql Ver 15.1 Distrib 10.1.21-MariaDB, for debian-linux-gnu (x86_64) using readline 5.2
Expected Behavior

We'd like to enable some type of DB connection pooling or be able to safely refuse the connection.

Actual Behavior

Our installation of Bookstack (5 users) is using 450 connections within a given hour, putting our DB host in an higher-than-comfortable operating state.

Thanks Dan

Originally created by @Ethanb00 on GitHub (Feb 25, 2017). * BookStack Version: v0.14.3 * PHP Version: PHP 7.0.13 * MySQL Version: mysql Ver 15.1 Distrib 10.1.21-MariaDB, for debian-linux-gnu (x86_64) using readline 5.2 ##### Expected Behavior We'd like to enable some type of DB connection pooling or be able to safely refuse the connection. ##### Actual Behavior Our installation of Bookstack (5 users) is using 450 connections within a given hour, putting our DB host in an higher-than-comfortable operating state. Thanks Dan
Author
Owner

@ssddanbrown commented on GitHub (Feb 25, 2017):

Hi @Ethanb00. Fist up I'll admit I'm not too knowledgeable on the technicalities of database connections so I may need some help understanding this issue.

From what I'm aware of, A connection is essentially 'released' back once the query has executed so it's not 'using them up' in any way. 450 does not sound absurd to me although I don't really have a baseline for what that value should be. Does the action of creating new connections really put a strain on a database server?

@ssddanbrown commented on GitHub (Feb 25, 2017): Hi @Ethanb00. Fist up I'll admit I'm not too knowledgeable on the technicalities of database connections so I may need some help understanding this issue. From what I'm aware of, A connection is essentially 'released' back once the query has executed so it's not 'using them up' in any way. 450 does not sound absurd to me although I don't really have a baseline for what that value should be. Does the action of creating new connections really put a strain on a database server?
Author
Owner

@Ethanb00 commented on GitHub (Feb 27, 2017):

Thanks for writing back @ssddanbrown.

Mostly our issue comes from the memory allocations required since there is a new connection required for each database action. We've added some parameters to MariaDB to minimize the impact, but it's not a particularly efficient process.

Essentially, I don't think the connections to the DB are timing out correctly.

@Ethanb00 commented on GitHub (Feb 27, 2017): Thanks for writing back @ssddanbrown. Mostly our issue comes from the memory allocations required since there is a new connection required for each database action. We've added some parameters to MariaDB to minimize the impact, but it's not a particularly efficient process. Essentially, I don't think the connections to the DB are timing out correctly.
Author
Owner

@ssddanbrown commented on GitHub (Jul 12, 2020):

Since I have not heard of any similar issues arise over the last 3 years, I'm going to close this off, but I'll try to keep it in mind in the event I see other similar issues filed in the future or if I'm doing DB optimization work.

If anyone comes across this in the future and can pin-point any particular issue, feel free to open a new issue referencing this one.

@ssddanbrown commented on GitHub (Jul 12, 2020): Since I have not heard of any similar issues arise over the last 3 years, I'm going to close this off, but I'll try to keep it in mind in the event I see other similar issues filed in the future or if I'm doing DB optimization work. If anyone comes across this in the future and can pin-point any particular issue, feel free to open a new issue referencing this one.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/BookStack#278