Welcome Guest, Not a member yet? Register   Sign In
Too many connections in MariaDB after CI and PHP upgrade
#1

Hi all:

I'm trying to update a project using Codeigniter 3.1.0 and PHP 7.0.6 (XAMPP) to Codeigniter 3.1.9 and PHP 7.3 (latest XAMPP) (Apache 2.4 and MariaDB 10.1 are common in both cases). I'm having the following problem:

Warning: mysqli::real_connect(): (08004/1040): Too many connections in C:\xampp73\htdocs\the_old_project\system\database\drivers\mysqli\mysqli_driver.php on line 201

Which immediately leads to:

Unable to connect to your database server using the provided settings.

The PHP configurations are the same for both versions, and the database server, even when it is not the same, shares the credentials, so PHPMyAdmin connects to both. I've increased the max_connections to 1024 in the latter database, but when I run the project with CI 3.1.0, it only uses 2 connections, but when I change the system folder for 3.1.9 it uses 1025 connections. I'm not using sessions in the database (so the migration steps related to sessions does not applies to this project)

Could you please suggest me where to search to find the origin of this issue? I can provide any other information/configurations needed to narrow down the search.

Thanks in advance!

P.S: Just in case, my config in application/config/database.php is:

$db['mysql_group'] = array(
    'dsn'    => '',
    'hostname' => 'localhost',
    'username' => 'root',
    'password' => 'my_password',
    'database' => 'oldsystem_data',
    'dbdriver' => 'mysqli',
    'dbprefix' => '',
    'pconnect' => FALSE,
    'db_debug' => (ENVIRONMENT !== 'production'),
    'cache_on' => FALSE,
    'cachedir' => '',
    'char_set' => 'utf8',
    'dbcollat' => 'utf8_general_ci',
    'swap_pre' => '',
    'encrypt' => FALSE,
    'compress' => FALSE,
    'stricton' => FALSE,
    'failover' => array(),
    'save_queries' => TRUE
);
Reply


Messages In This Thread
Too many connections in MariaDB after CI and PHP upgrade - by nalonso - 01-02-2019, 07:16 PM



Theme © iAndrew 2016 - Forum software by © MyBB