forum.coppermine-gallery.net
Support => cpg1.4.x Support => Older/other versions => cpg1.4 miscellaneous => Topic started by: Master of Orion on May 11, 2007, 08:50:26 pm
-
Hi dear developers of Coppermine !
Our photo collection http://china.kulichki.com/pictures/ have files and we are having about 10.000 views of Coppermine’s pages .
Our Coppermine - 1.4.9 . Run at Apache/1.3.33 (Unix) PHP/4.4.1 rus/PL30.20 MySQL Client API version 4.0.26
Often a error like this are occur –
Coppermine critical error:
Unable to connect to database !
MySQL said: User china has already more than 'max_user_connections' active connections
Our server administrator says that its problem with the Coppermine system. Coppermine cannot able to serve so many pictures and page views...
It is possible? Can Coppermine more pics than 25948 and more views?
What I must to do?
-
This Picture collection have 25948 files in 579 albums and 48 categories with 6918 comments viewed 2175067 times
-
Get the 'max_user_connections' increased then.
-
Connections about 400 seconds «connecting» to base and administrator say that connection not closed automatically
-
Connections are closed automatically unless you have made code modifications. I don't understand the rest of your reply.
-
Can Coppermine support more pics than 25948 and more views than 10.000?
-
Yes, easily. The limiting factor is your hardware and server setup.
-
Hi Nibbler,
I've also been getting this problem - "Mysql said: too many connections"
How do you increase the "max_user_connections" ?
Pse advice.
Thanks.
-
Hi Nibbler,
forget my request - I'm reading up on it.
thanks.
-
For MySQL too many connections error message try to use MySQL with persistent connections
For details read this:
http://se.php.net/manual/en/function.mysql-pconnect.php
For updating Coppermine change in /include/functions.inc.php
from
$result = @mysql_connect($CONFIG['dbserver'], $CONFIG['dbuser'], $CONFIG['dbpass']);
to
$result = @mysql_pconnect($CONFIG['dbserver'], $CONFIG['dbuser'], $CONFIG['dbpass']);
ie just add a "p" to the connect for persistent connections
-
Hi Veronica,
thanks for the tip.
just wonder...would it create any problems anywhere?
does anybody had any experience with persistent connections?
-
Depending on how your php is setup it could either help, do nothing, or make things worse. Take it up with your host and see what they suggest. Also, there is code posted somewhere to spread the load over multiple users. You could try that - search the board.
-
Hi Nibbler,
I searched the board, can't find anything about multiple users, but I found a thread suggesting that a way to resolve the "too many connections" problem is to reduce the number of links on the frontpage that connects to the database.
I not sure I interpreted it correctly. I have a number of images on my frontpage that are pulled from the database. If I cut done on these links to the database, would it help to resolve the connection problem?
Pse advice.
thanks.
-
Do as Nibbler suggested and ask you webhost for support. The number of items on each page doesn't have an impact on the "too many connections" issue.
-
Thanks GauGau.
Will check with web host.