• Resolved willemb2

    (@willemb2)


    I got an e-mail that my site had a serious technical problem. When I went looking, everything seemed to be running fine, but I’ll post the details below (translated, domain en db_user edited). At the moment it happened we were sending a MailPoet newsletter.

    WordPress versie 6.4.3
    Active theme: Enfold Child (versie 1.0)
    Current plugin: Independent Analytics (versie 2.3.1)
    PHP version 8.1.27

    Error details
    ===========
    An error of type E_ERROR was caused on line number 589 of file /var/www/vhosts/example.com/httpdocs/wp-content/plugins/independent-analytics/vendor/illuminate/database/Connection.php. Error message: Uncaught PDOException: SQLSTATE[HY000] [1203] User <db_user> already has more than 'max_user_connections' active connections in /var/www/vhosts/example.com/httpdocs/wp-content/plugins/independent-analytics/vendor/illuminate/database/Connectors/Connector.php:53
    Stack trace:
    #0 /var/www/vhosts/example.com/httpdocs/wp-content/plugins/independent-analytics/vendor/illuminate/database/Connectors/Connector.php(53): PDO->__construct('mysql:host=loca...', '<db_user>', 'M)1ZtJsusNElD[#...', Array)
    #1 /var/www/vhosts/example.com/httpdocs/wp-content/plugins/independent-analytics/vendor/illuminate/database/Connectors/Connector.php(34): IAWPSCOPED\Illuminate\Database\Connectors\Connector->createPdoConnection('mysql:host=loca...', '<db_user>', 'M)1ZtJsusNElD[#...', Array)
    #2 /var/www/vhosts/example.com/httpdocs/wp-content/plugins/independent-analytics/vendor/illuminate/database/Connectors/MySqlConnector.php(22): IAWPSCOPED\Illuminate\Database\Connectors\Connector->createConnection('mysql:host=loca...', Array, Array)
    #3 /var/www/vhosts/example.com/httpdocs/wp-content/plugins/independent-analytics/vendor/illuminate/database/Connectors/ConnectionFactory.php(157): IAWPSCOPED\Illuminate\Database\Connectors\MySqlConnector->connect(Array)
    #4 /var/www/vhosts/example.com/httpdocs/wp-content/plugins/independent-analytics/vendor/illuminate/database/Connection.php(884): IAWPSCOPED\Illuminate\Database\Connectors\ConnectionFactory->IAWPSCOPED\Illuminate\Database\Connectors\{closure}()
    #5 /var/www/vhosts/example.com/httpdocs/wp-content/plugins/independent-analytics/vendor/illuminate/database/Connection.php(913): IAWPSCOPED\Illuminate\Database\Connection->getPdo()
    #6 /var/www/vhosts/example.com/httpdocs/wp-content/plugins/independent-analytics/vendor/illuminate/database/Connection.php(374): IAWPSCOPED\Illuminate\Database\Connection->getReadPdo()
    #7 /var/www/vhosts/example.com/httpdocs/wp-content/plugins/independent-analytics/vendor/illuminate/database/Connection.php(319): IAWPSCOPED\Illuminate\Database\Connection->getPdoForSelect(true)
    #8 /var/www/vhosts/example.com/httpdocs/wp-content/plugins/independent-analytics/vendor/illuminate/database/Connection.php(587): IAWPSCOPED\Illuminate\Database\Connection->IAWPSCOPED\Illuminate\Database\{closure}('select exists(s...', Array)
    #9 /var/www/vhosts/example.com/httpdocs/wp-content/plugins/independent-analytics/vendor/illuminate/database/Connection.php(561): IAWPSCOPED\Illuminate\Database\Connection->runQueryCallback('select exists(s...', Array, Object(Closure))
    #10 /var/www/vhosts/example.com/httpdocs/wp-content/plugins/independent-analytics/vendor/illuminate/database/Connection.php(323): IAWPSCOPED\Illuminate\Database\Connection->run('select exists(s...', Array, Object(Closure))
    #11 /var/www/vhosts/example.com/httpdocs/wp-content/plugins/independent-analytics/vendor/illuminate/database/Query/Builder.php(2250): IAWPSCOPED\Illuminate\Database\Connection->select('select exists(s...', Array, true)
    #12 /var/www/vhosts/example.com/httpdocs/wp-content/plugins/independent-analytics/vendor/illuminate/database/Query/Builder.php(2267): IAWPSCOPED\Illuminate\Database\Query\Builder->exists()
    #13 /var/www/vhosts/example.com/httpdocs/wp-content/plugins/independent-analytics/IAWP/Database.php(39): IAWPSCOPED\Illuminate\Database\Query\Builder->doesntExist()
    #14 /var/www/vhosts/example.com/httpdocs/wp-content/plugins/independent-analytics/iawp-bootstrap.php(249): IAWP\Database::is_missing_all_tables()
    #15 /var/www/vhosts/example.com/httpdocs/wp-content/plugins/independent-analytics/iawp.php(70): require_once('/var/www/vhosts...')
    #16 /var/www/vhosts/example.com/httpdocs/wp-settings.php(473): include_once('/var/www/vhosts...')
    #17 /var/www/vhosts/example.com/httpdocs/wp-config.php(108): require_once('/var/www/vhosts...')
    #18 /var/www/vhosts/example.com/httpdocs/wp-load.php(50): require_once('/var/www/vhosts...')
    #19 /var/www/vhosts/example.com/httpdocs/wp-admin/admin-ajax.php(22): require_once('/var/www/vhosts...')
    #20 {main}
    Next IAWPSCOPED\Illuminate\Database\QueryException: SQLSTATE[HY000] [1203] User <db_user> already has more than 'max_user_connections' active connections (SQL: select exists(select * from INFORMATION_SCHEMA.TABLES where TABLE_SCHEMA = <db_user> and TABLE_NAME LIKE wp_independent_analytics_%) as exists) in /var/www/vhosts/example.com/httpdocs/wp-content/plugins/independent-analytics/vendor/illuminate/database/Connection.php:589
    Stack trace:
    #0 /var/www/vhosts/example.com/httpdocs/wp-content/plugins/independent-analytics/vendor/illuminate/database/Connection.php(561): IAWPSCOPED\Illuminate\Database\Connection->runQueryCallback('select exists(s...', Array, Object(Closure))
    #1 /var/www/vhosts/example.com/httpdocs/wp-content/plugins/independent-analytics/vendor/illuminate/database/Connection.php(323): IAWPSCOPED\Illuminate\Database\Connection->run('select exists(s...', Array, Object(Closure))
    #2 /var/www/vhosts/example.com/httpdocs/wp-content/plugins/independent-analytics/vendor/illuminate/database/Query/Builder.php(2250): IAWPSCOPED\Illuminate\Database\Connection->select('select exists(s...', Array, true)
    #3 /var/www/vhosts/example.com/httpdocs/wp-content/plugins/independent-analytics/vendor/illuminate/database/Query/Builder.php(2267): IAWPSCOPED\Illuminate\Database\Query\Builder->exists()
    #4 /var/www/vhosts/example.com/httpdocs/wp-content/plugins/independent-analytics/IAWP/Database.php(39): IAWPSCOPED\Illuminate\Database\Query\Builder->doesntExist()
    #5 /var/www/vhosts/example.com/httpdocs/wp-content/plugins/independent-analytics/iawp-bootstrap.php(249): IAWP\Database::is_missing_all_tables()
    #6 /var/www/vhosts/example.com/httpdocs/wp-content/plugins/independent-analytics/iawp.php(70): require_once('/var/www/vhosts...')
    #7 /var/www/vhosts/example.com/httpdocs/wp-settings.php(473): include_once('/var/www/vhosts...')
    #8 /var/www/vhosts/example.com/httpdocs/wp-config.php(108): require_once('/var/www/vhosts...')
    #9 /var/www/vhosts/example.com/httpdocs/wp-load.php(50): require_once('/var/www/vhosts...')
    #10 /var/www/vhosts/example.com/httpdocs/wp-admin/admin-ajax.php(22): require_once('/var/www/vhosts...')
    #11 {main} thrown

    The page I need help with: [log in to see the link]

Viewing 8 replies - 1 through 8 (of 8 total)
  • Plugin Author Ben Sibley

    (@bensibley)

    Hi there,

    Thanks for sharing this error message with us.

    This error is saying that the site ran more database queries at once than allowed (max_connections) and pointing to a query from our plugin. However, I can’t imagine this particular query would run more than twice, and the number of max connections is usually 150. I think it must be related to the email newsletter being sent at the same time, or perhaps the number of max connections is set very low.

    It would be great to know the number of max connections allowed just to rule that out. To find this value, you can login to your hosting panel, and you should see a tool called phpMyAdmin. It might just be called “Database access” or something like that. Inside phpMyAdmin, can click on your database in the left sidebar and then click on the SQL tab at the top. Lastly, enter the code snippet below and click the “Go” button.

    SHOW VARIABLES LIKE 'max_connections';

    Here’s a screenshot of how it will look: https://d.pr/i/4s9yFs

    If that value is really low then that could explain the error, but otherwise, we can at least rule it out as the culprit.

    We’ll start some testing with MailPoet as well to check for errors.

    Thread Starter willemb2

    (@willemb2)

    Hi @bensibley,

    That returns a value of 75. I have sites on 2 other hosting comanies and they also return 75. They are similar though, all based on Plesk and Litespeed.

    Plugin Author Ben Sibley

    (@bensibley)

    Thanks for checking that! 75 is totally fine, so we can rule that out.

    We will run some tests with MailPoet, and could you let me know if this happens again the next time a newsletter is sent?

    Thread Starter willemb2

    (@willemb2)

    I will. The next one is due April 6th. We installed IA about a month ago. A newsletter was sent once before without this error occurring. But that was before 2.3.0 and I have changed a setting since then: enabled ‘Track logged in users’.

    Plugin Author Ben Sibley

    (@bensibley)

    Thanks for the info. This particular DB query was added in 2.3.0, so that would explain why this error just occurred for the first time.

    Plugin Author Ben Sibley

    (@bensibley)

    We were able to find the cause of this error and we’re releasing a patch called version 2.3.2 now. You should see an update notification in your Plugins menu in a few minutes.

    Thread Starter willemb2

    (@willemb2)

    Sorry, 2.3.2 did not fully fix it. We were not sending a MailPoet newsletter when it happened this time. But the site is alive and kicking, so don’t let this spoil your weekend.

    An error of type E_ERROR was caused in line 589 of the file /var/www/vhosts/example.com/httpdocs/wp-content/plugins/independent-analytics/vendor/illuminate/database/Connection.php. Foutmelding: Uncaught PDOException: SQLSTATE[HY000] [1203] User <db_user> already has more than 'max_user_connections' active connections in /var/www/vhosts/example.com/httpdocs/wp-content/plugins/independent-analytics/vendor/illuminate/database/Connectors/Connector.php:53
    Stack trace:
    #0 /var/www/vhosts/example.com/httpdocs/wp-content/plugins/independent-analytics/vendor/illuminate/database/Connectors/Connector.php(53): PDO->__construct('mysql:host=loca...', '<db_user>', 'M)1ZtJs%cNElD[#...', Array)
    #1 /var/www/vhosts/example.com/httpdocs/wp-content/plugins/independent-analytics/vendor/illuminate/database/Connectors/Connector.php(34): IAWPSCOPED\Illuminate\Database\Connectors\Connector->createPdoConnection('mysql:host=loca...', '<db_user>', 'M)1ZtJs%cNElD[#...', Array)
    #2 /var/www/vhosts/example.com/httpdocs/wp-content/plugins/independent-analytics/vendor/illuminate/database/Connectors/MySqlConnector.php(22): IAWPSCOPED\Illuminate\Database\Connectors\Connector->createConnection('mysql:host=loca...', Array, Array)
    #3 /var/www/vhosts/example.com/httpdocs/wp-content/plugins/independent-analytics/vendor/illuminate/database/Connectors/ConnectionFactory.php(157): IAWPSCOPED\Illuminate\Database\Connectors\MySqlConnector->connect(Array)
    #4 /var/www/vhosts/example.com/httpdocs/wp-content/plugins/independent-analytics/vendor/illuminate/database/Connection.php(884): IAWPSCOPED\Illuminate\Database\Connectors\ConnectionFactory->IAWPSCOPED\Illuminate\Database\Connectors\{closure}()
    #5 /var/www/vhosts/example.com/httpdocs/wp-content/plugins/independent-analytics/vendor/illuminate/database/Connection.php(913): IAWPSCOPED\Illuminate\Database\Connection->getPdo()
    #6 /var/www/vhosts/example.com/httpdocs/wp-content/plugins/independent-analytics/vendor/illuminate/database/Connection.php(374): IAWPSCOPED\Illuminate\Database\Connection->getReadPdo()
    #7 /var/www/vhosts/example.com/httpdocs/wp-content/plugins/independent-analytics/vendor/illuminate/database/Connection.php(319): IAWPSCOPED\Illuminate\Database\Connection->getPdoForSelect(true)
    #8 /var/www/vhosts/example.com/httpdocs/wp-content/plugins/independent-analytics/vendor/illuminate/database/Connection.php(587): IAWPSCOPED\Illuminate\Database\Connection->IAWPSCOPED\Illuminate\Database\{closure}('select exists(s...', Array)
    #9 /var/www/vhosts/example.com/httpdocs/wp-content/plugins/independent-analytics/vendor/illuminate/database/Connection.php(561): IAWPSCOPED\Illuminate\Database\Connection->runQueryCallback('select exists(s...', Array, Object(Closure))
    #10 /var/www/vhosts/example.com/httpdocs/wp-content/plugins/independent-analytics/vendor/illuminate/database/Connection.php(323): IAWPSCOPED\Illuminate\Database\Connection->run('select exists(s...', Array, Object(Closure))
    #11 /var/www/vhosts/example.com/httpdocs/wp-content/plugins/independent-analytics/vendor/illuminate/database/Query/Builder.php(2250): IAWPSCOPED\Illuminate\Database\Connection->select('select exists(s...', Array, true)
    #12 /var/www/vhosts/example.com/httpdocs/wp-content/plugins/independent-analytics/vendor/illuminate/database/Query/Builder.php(2267): IAWPSCOPED\Illuminate\Database\Query\Builder->exists()
    #13 /var/www/vhosts/example.com/httpdocs/wp-content/plugins/independent-analytics/IAWP/Database.php(39): IAWPSCOPED\Illuminate\Database\Query\Builder->doesntExist()
    #14 /var/www/vhosts/example.com/httpdocs/wp-content/plugins/independent-analytics/iawp-bootstrap.php(249): IAWP\Database::is_missing_all_tables()
    #15 /var/www/vhosts/example.com/httpdocs/wp-content/plugins/independent-analytics/iawp.php(70): require_once('/var/www/vhosts...')
    #16 /var/www/vhosts/example.com/httpdocs/wp-settings.php(473): include_once('/var/www/vhosts...')
    #17 /var/www/vhosts/example.com/httpdocs/wp-config.php(108): require_once('/var/www/vhosts...')
    #18 /var/www/vhosts/example.com/httpdocs/wp-load.php(50): require_once('/var/www/vhosts...')
    #19 /var/www/vhosts/example.com/httpdocs/wp-admin/admin-ajax.php(22): require_once('/var/www/vhosts...')
    #20 {main}
    Next IAWPSCOPED\Illuminate\Database\QueryException: SQLSTATE[HY000] [1203] User <db_user> already has more than 'max_user_connections' active connections (SQL: select exists(select * from INFORMATION_SCHEMA.TABLES where TABLE_SCHEMA = <db_user> and TABLE_NAME LIKE wp_independent_analytics_%) as exists) in /var/www/vhosts/example.com/httpdocs/wp-content/plugins/independent-analytics/vendor/illuminate/database/Connection.php:589
    Stack trace:
    #0 /var/www/vhosts/example.com/httpdocs/wp-content/plugins/independent-analytics/vendor/illuminate/database/Connection.php(561): IAWPSCOPED\Illuminate\Database\Connection->runQueryCallback('select exists(s...', Array, Object(Closure))
    #1 /var/www/vhosts/example.com/httpdocs/wp-content/plugins/independent-analytics/vendor/illuminate/database/Connection.php(323): IAWPSCOPED\Illuminate\Database\Connection->run('select exists(s...', Array, Object(Closure))
    #2 /var/www/vhosts/example.com/httpdocs/wp-content/plugins/independent-analytics/vendor/illuminate/database/Query/Builder.php(2250): IAWPSCOPED\Illuminate\Database\Connection->select('select exists(s...', Array, true)
    #3 /var/www/vhosts/example.com/httpdocs/wp-content/plugins/independent-analytics/vendor/illuminate/database/Query/Builder.php(2267): IAWPSCOPED\Illuminate\Database\Query\Builder->exists()
    #4 /var/www/vhosts/example.com/httpdocs/wp-content/plugins/independent-analytics/IAWP/Database.php(39): IAWPSCOPED\Illuminate\Database\Query\Builder->doesntExist()
    #5 /var/www/vhosts/example.com/httpdocs/wp-content/plugins/independent-analytics/iawp-bootstrap.php(249): IAWP\Database::is_missing_all_tables()
    #6 /var/www/vhosts/example.com/httpdocs/wp-content/plugins/independent-analytics/iawp.php(70): require_once('/var/www/vhosts...')
    #7 /var/www/vhosts/example.com/httpdocs/wp-settings.php(473): include_once('/var/www/vhosts...')
    #8 /var/www/vhosts/example.com/httpdocs/wp-config.php(108): require_once('/var/www/vhosts...')
    #9 /var/www/vhosts/example.com/httpdocs/wp-load.php(50): require_once('/var/www/vhosts...')
    #10 /var/www/vhosts/example.com/httpdocs/wp-admin/admin-ajax.php(22): require_once('/var/www/vhosts...')
    #11 {main} thrown
    
    • This reply was modified 6 months ago by willemb2.
    Plugin Author Ben Sibley

    (@bensibley)

    Thanks for the note! We found a better way to fix this error, and it will be fully resolved in the next update (v2.4).

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘PDOException more than ‘max_user_connections’’ is closed to new replies.