News:

CRITICAL UPGRADE CPG RELEASE 1.6.30
Version 1.6.30 removes a serious security issue that could allow unauthorized access to modify your site. Upgrade as soon as possible.

Main Menu

Recent posts

#1
cpg1.6 miscellaneous / Re: Coppermine db overloading ...
Last post by ron4mac - Today at 02:06:07 PM
Quote from: mdafun on November 21, 2026, 06:55:39 PMWith SHOW VARIABLES LIKE 'max_user_connections';
the result is
max_user_connections 100
All my commercial servers (Siteground, Linode/Akamai) show a zero value for that (unlimited, I assume).
If you are looking at the database from your CPanel, your connection may be from a user that is not the same as what is set for your CPG/Wordpress instances. I use a separate mysql manager app to avoid CPanel issues (https://www.adminer.org), as well as my own file manager (https://github.com/ron4mac/hosted-file-manager).
You should verify connection limitations by connecting to a database with the actual user/pass from your CPG/Wordpress configurations.
#2
cpg1.6 miscellaneous / Re: Coppermine db overloading ...
Last post by phill104 - Yesterday at 04:49:34 PM
As I suggested above, check your file systems for any files that should not be there.

Then check your servers access logs and see if you can detect where all these just are being generated from. Often the servers access and error logs can be very revealing in these cases.
#3
cpg1.6 miscellaneous / Re: Coppermine db overloading ...
Last post by mdafun - Yesterday at 02:36:07 PM
That's why I'm saying there are clearly other issues with CPG. Next time this happens, I'll post the database log.

I've also restricted access to search.php to registered users only (a setting that should be added to the settings page on the next releases), even though we know full well that searches can also be carried out via thumbnails.php (which is now restricted to registered, but has always been open to guests for 20 years without any problems).
All these issues have arisen over the last year.

on search.php
define('IN_COPPERMINE', true);
define('SEARCH_PHP', true);

require('include/init.inc.php');

[b]//LIMIT TO REGISTERED
if (!USER_ID) {
    cpg_die(ERROR, 'La ricerca รจ riservata agli utenti registrati.', __FILE__, __LINE__);
}
//END ADD[/b]

if (!USER_ID && $CONFIG['allow_unlogged_access'] == 0) {
    $redirect = 'login.php';
    header("Location: $redirect");
    exit();
}
#4
cpg1.6 miscellaneous / Re: Coppermine db overloading ...
Last post by ron4mac - Yesterday at 03:51:15 AM
Quote from: mdafun on November 21, 2026, 06:55:39 PMWith SHOW VARIABLES LIKE 'max_user_connections';
the result is
max_user_connections 100
Why the error that you are showing above then?  ???
#5
cpg1.6 miscellaneous / Re: Coppermine db overloading ...
Last post by mdafun - November 21, 2026, 06:55:39 PM
With SHOW VARIABLES LIKE 'max_user_connections';
the result is
max_user_connections 100
#6
cpg1.6 miscellaneous / Re: Coppermine db overloading ...
Last post by ron4mac - November 21, 2026, 06:24:45 PM
This from Claude:

What the error means

MySQL/MariaDB's max_user_connections caps how many simultaneous connections a single account can hold. Your limit is 9, and the account XYZ hit it. On shared hosting this limit is usually set per MySQL user, so:

If every database uses the same user XYZ, all your sites and scripts share one pool of 9 connections.
If each database had its own user, each would get its own pool of 9.

Why separate users might help

If you run several sites or apps (say, multiple WordPress installs) all connecting as XYZ, they compete for the same 9 slots. A traffic spike or a few slow queries on one site can starve the others. Separate users would isolate them.

The catch with Aruba

On many Aruba shared plans, the database user is tied to the database itself. You create a database and get a username (often the same as the database name) automatically, and you may not be able to create extra users or assign one user to several databases. If your control panel only lets you create databases with auto-assigned credentials, you may already effectively have one user per database. In that case the limit is being hit by a single site or script, and splitting users won't fix it.

Things worth checking first

Does XYZ serve multiple databases or sites? If so, separating them is a reasonable fix, if the panel allows it.
Persistent connections. If your code uses mysqli_pconnect or PDO with PDO::ATTR_PERSISTENT, connections stay open and pile up. Switch to normal connections.
Unclosed connections or slow queries. Scripts that never close connections, or queries that run long, hold slots open. Cron jobs and bots hitting the site can also add up.
Plugins. In WordPress, heavy plugins, backup jobs, or security scanners running at the same time can easily consume 9 connections.
Caching. A page cache (e.g., WP Super Cache, LiteSpeed Cache if available) cuts the number of DB hits dramatically.
Traffic spikes or bots. Check your access logs for crawlers or abusive requests.

Practical next steps

Look in the Aruba control panel under the MySQL/database section to see whether you can create additional users or assign them per database.
If you can't, ask Aruba support whether the limit can be raised or whether a plan upgrade has a higher max_user_connections. A 9-connection cap is quite tight for anything beyond a small site.
Meanwhile, reduce load with caching and by eliminating persistent connections.
#7
cpg1.6 miscellaneous / Re: Coppermine db overloading ...
Last post by mdafun - November 21, 2026, 04:36:07 PM
Quote from: ron4mac on November 17, 2026, 03:51:52 AMDoes aruba.it allow you to have more than one database user?
To inspect and try to solve, I used another database, with a different username, for galleries, independent from the rest of wordpress/vbulletin.
In this database there are the 3 galleries of coppermine; of course, here too, three galleries can make multiple simultaneous calls to the database, but as far as I understand, the calls are queued; according to the technicians, some calls remain open and are not completed. Otherwise, it wouldn't be possible to have more than 10 users in the gallery at the same time, would it?

Quote from: 406man on November 17, 2026, 09:09:03 AMFor example, "Revolving cableway system"s and "automatic hooking ropeway systems".  Creating this table with the album and picture totals requires a very large number of database accesses and will be contributing to the high server load.
Do you intend the list of categories? Otherwise, how am I supposed to grant access to all the albums? But shouldn't all this be cached?
#8
cpg1.6 miscellaneous / Re: Coppermine db overloading ...
Last post by 406man - November 17, 2026, 09:09:03 AM
It's useful to be able to see the web site. The lower part of the gallery home page has a large table containing the album categories :  https://www.funivie.org/funigallery/

For example, "Revolving cableway system"s and "automatic hooking ropeway systems".  Creating this table with the album and picture totals requires a very large number of database accesses and will be contributing to the high server load. I suggest temporarily disabling the display of this table to see how much the load decreases. If it makes a worthwhile difference you have confirmed that there will be an improvement when implementing a lower impact alternative. Or maybe it will make little difference.
#9
cpg1.6 miscellaneous / Re: Coppermine db overloading ...
Last post by ron4mac - November 17, 2026, 03:51:52 AM
Does aruba.it allow you to have more than one database user? If it does, you might try having one user for Wordpress access and a different one for CPG access. Since aruba.it has a strict cap of 9 concurrent connections by the same user, it wouldn't take too much for bots hitting both the Wordpress and CPG pages to occasionally run into that limit. Regardless of the caching plugin, every CPG access requires at least one database access. You might look into whether there is a Wordpress cache that is more total, requiring no database access. Failing all else, you might have to consider a more robust hosting plan.
#10
cpg1.6 miscellaneous / Re: Coppermine db overloading ...
Last post by mdafun - November 16, 2026, 09:18:13 AM
https://www.funivie.org/cantieri/
https://www.funivie.org/funigallery/
the cache is enabled, folder is writable and I can see the html files, so it works.

But every so often โ€“ not every day โ€“ the script is inundated with requests that overload the database. This happens every 3โ€“4 days.
Files are all updated