OldNGrey
ZC158a PHP 8.2.15
MySQL 10.6.16-MariaDB
If no number is shown, it's because it is 0 which is no limit (https://github.com/zencart/zencart/issues/6228).
Steve
github.com/torvista: BackupMySQL, Structured Data, Multiple Copy-Move-Delete, Google reCaptcha, Image Checker, Spanish Language Pack and more...
I'll note that my hosting company has their shared server option limited to 25.
I was getting errors from this so moved to their VPS option with no limit/my limit. No errors since.
For interest I reduced this to 25 recently. No errors since, so I'm assuming it was some external factors triggering those errors on the shared server.
Steve
github.com/torvista: BackupMySQL, Structured Data, Multiple Copy-Move-Delete, Google reCaptcha, Image Checker, Spanish Language Pack and more...
Hi. I just tried your code with zc1.58a with php 8.1, and it worked great except one typo... Here is the updated code:
Code:$dbusers = array( array('user' => 'mysql_username_1', 'password' => 'mysql_password_1') // First MySQL user/password combination , array('user' => 'mysql_username_2', 'password' => 'mysql_password_2') // Second MySQL user/password combination , array('user' => 'mysql_username_3', 'password' => 'mysql_password_3') // Third MySQL user/password combination ); $mysql_user = $dbusers[rand(0, count($dbusers) - 1)]; define('DB_SERVER_USERNAME', $mysql_user['user']); define('DB_SERVER_PASSWORD', $mysql_user['password']);
>Hi. I just tried your code with zc1.58a with php 8.1, and it worked great
You mean you've stopped getting the error logs?
Steve
github.com/torvista: BackupMySQL, Structured Data, Multiple Copy-Move-Delete, Google reCaptcha, Image Checker, Spanish Language Pack and more...
So my site was killed over the last couple of days, CPU and memory shot up to 100%
I got the server log and examined the hits per minute by counting the rows:
hour min rows 10 35 135 10 36 99 10 37 177 10 38 128 10 39 319 10 40 279 10 41 212 10 42 190 10 43 132
Just from this I don't think this is excessive.
Anyway, examining in detail 10.39 I find it to be mainly
facebookexternalhit/1.1 (+http://www.facebook.com/externalhit_uatext.php)
but the hits are at most 3 per second. Again, this does not seem excessive enough to max out the cpu/memory.
max_user_connections is at 30.
I'm using three mysql users, rotating randomly as above: if I used only one, the site page would show the database connection error.
There are always two errors
--> PHP Warning: mysqli_connect(): (HY000/1203): User tienda_user1 already has more than 'max_user_connections' active connections in includes/classes/db/mysql/query_factory.php on line 86.
and
[29-Jun-2024 14:24:37 Europe/Madrid] PHP Fatal error: Uncaught PDOException: SQLSTATE[HY000] [1203] User tienda_user1 already has more than 'max_user_connections' active connections in ...../laravel/vendor/illuminate/database/Connectors/Connector.php:70
Stack trace:
followed by a load of laravel trace.
I assumed the second debug was just the result of the first....
But, my site has never had these problems until the last couple of years.
Is it possible that the addition of Laravel has introduced some performance issue that only shows up on these more restricted servers?
There are multiple threads on this max_user_connections error.
I would note that my site while being heavily customised, is using the GitHub development code.
I don't think I can take this any further apart from upping the server spec, but maybe that is just masking a problem.
I'm open to dev suggestions as to what more can be done to investigate further, or if the above traffic and result is not unreasonable.
Steve
github.com/torvista: BackupMySQL, Structured Data, Multiple Copy-Move-Delete, Google reCaptcha, Image Checker, Spanish Language Pack and more...
In the end I moved to a server without the low restrictions....end of error logs and site disappearing.
Steve
github.com/torvista: BackupMySQL, Structured Data, Multiple Copy-Move-Delete, Google reCaptcha, Image Checker, Spanish Language Pack and more...
Bookmarks