Project

General

Profile

How to increase connection pool (MySQL)

Added by Fabian L. over 3 years ago

Hi everyone!

Currently, our Redmine installation opens a single connection to the DB.
From what we've seen, this could be, in some way, a limitation in terms of performance, so what we're trying to do is to allow Redmine to open more than one connection to the DB.

We've already set in the config/database.yml file a max of 5 connections. However, it hasn't had the desired effect (it keeps opening a single connection).
Could someone assist us on increasing the amount of connections to the DB?

Installation details:

Installed on Docker 19.03.1

Redmine version 3.4.6.stable
Ruby version 2.4.5-p335 (2018-10-18) [x86_64-linux]
Rails version 4.2.8
Environment production
Database adapter Mysql2
DB: MySQL 5.6.26 (Red Hat Enterprise Linux Server release 7.1 virtual server)

Any help would be much appreciated.
Thanks in advance!


Replies (3)

RE: How to increase connection pool (MySQL) - Added by Lorenzo Meneghetti over 3 years ago

Hi, I think you are in the wrong way.
config/database.yml keeps environment information to reach database, not the connections.

You have to edit mysql global variable to handle connections and performances.
Thanks
Lorenzo

RE: How to increase connection pool (MySQL) - Added by Fabián L. over 3 years ago

Hi, Lorenzo.

Thanks for your response.
When you say "edit mysql global variable", do you mean the system variables, such as MAX_CONNECTIONS and PERFORMANCE_SCHEMA_MAX_THREAD_INSTANCES?

Thanks!

RE: How to increase connection pool (MySQL) - Added by Lorenzo Meneghetti over 3 years ago

Fabián L. wrote:

Hi, Lorenzo.

Thanks for your response.
When you say "edit mysql global variable", do you mean the system variables, such as MAX_CONNECTIONS and PERFORMANCE_SCHEMA_MAX_THREAD_INSTANCES?

Thanks!

Hi, yes, but not only. The topic is mysql performance tuning and optimization. There are plenty of documentation about it.
Thanks
Lorenzo

    (1-3/3)