Advanced search  

News:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

Pages: [1]   Go Down

Author Topic: Unable to connect to database !  (Read 5849 times)

0 Members and 1 Guest are viewing this topic.

Master of Orion

  • Coppermine newbie
  • Offline Offline
  • Gender: Male
  • Posts: 10
    • Wonderful China
Unable to connect to database !
« 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?
« Last Edit: September 09, 2007, 12:08:58 pm by GauGau »
Logged

Master of Orion

  • Coppermine newbie
  • Offline Offline
  • Gender: Male
  • Posts: 10
    • Wonderful China
Re: Unable to connect to database !
« Reply #1 on: May 11, 2007, 08:54:55 pm »

This Picture collection have 25948 files in 579 albums and 48 categories with 6918 comments viewed 2175067 times

Nibbler

  • Guest
Re: Unable to connect to database !
« Reply #2 on: May 11, 2007, 09:00:17 pm »

Get the 'max_user_connections' increased then.
Logged

Master of Orion

  • Coppermine newbie
  • Offline Offline
  • Gender: Male
  • Posts: 10
    • Wonderful China
Re: Unable to connect to database !
« Reply #3 on: May 11, 2007, 09:07:24 pm »

Connections about 400 seconds «connecting» to base and administrator say that connection not closed automatically

Nibbler

  • Guest
Re: Unable to connect to database !
« Reply #4 on: May 11, 2007, 09:12:42 pm »

Connections are closed automatically unless you have made code modifications. I don't understand the rest of your reply.
Logged

Master of Orion

  • Coppermine newbie
  • Offline Offline
  • Gender: Male
  • Posts: 10
    • Wonderful China
Re: Unable to connect to database !
« Reply #5 on: May 11, 2007, 09:27:56 pm »

Can Coppermine support  more pics  than  25948  and more views than 10.000?

Nibbler

  • Guest
Re: Unable to connect to database !
« Reply #6 on: May 11, 2007, 10:03:18 pm »

Yes, easily. The limiting factor is your hardware and server setup.
Logged

eka

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Posts: 73
Re: Unable to connect to database !
« Reply #7 on: September 09, 2007, 09:40:50 am »

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.
Logged

eka

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Posts: 73
Re: Unable to connect to database !
« Reply #8 on: September 09, 2007, 09:50:51 am »

Hi Nibbler,

forget my request - I'm reading up on it.

thanks.
Logged

Veronica

  • Contributor
  • Coppermine frequent poster
  • ***
  • Country: se
  • Offline Offline
  • Posts: 106
  • Coppermine 1.5.22
Re: Unable to connect to database !
« Reply #9 on: September 09, 2007, 06:56:15 pm »

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
Logged

eka

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Posts: 73
Re: Unable to connect to database !
« Reply #10 on: September 15, 2007, 02:07:42 am »

Hi Veronica,

thanks for the tip.

just wonder...would it create any problems anywhere?

does anybody had any experience with persistent connections?
Logged

Nibbler

  • Guest
Re: Unable to connect to database !
« Reply #11 on: September 15, 2007, 02:31:14 pm »

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.
Logged

eka

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Posts: 73
Re: Unable to connect to database !
« Reply #12 on: September 16, 2007, 10:02:41 am »

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.
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: Unable to connect to database !
« Reply #13 on: September 16, 2007, 06:51:48 pm »

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.
Logged

eka

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Posts: 73
Re: Unable to connect to database !
« Reply #14 on: September 17, 2007, 03:12:17 am »

Thanks GauGau.
Will check with web host.
Logged
Pages: [1]   Go Up
 

Page created in 0.023 seconds with 20 queries.