You are viewing this forum as a guest. Login to an existing account, or create a new account, to reply to topics and to create new topics.
I have a question about CCP 6 and a problem that we are having. We have been getting a lot of "The MySQL extension could not connect to the database. MySQL reported the error as: User xxxxx has already more than 'max_user_connections' active connections"
I had looked at the topic that was posted in the forum about the above issue but it did not seem to address the possible actual problem or solution.
Right now the limit is 75000 per hour which I know we are not hitting. We have been in and looked at the database through phpMyAdmin and the hosting company keeps saying that we have a problem with some of the scripts. Doing a check we are seeing where we get a warning with the ccp0_dynformfields. It is saying that the Primary and Index keys are both set for column ID.
I guess my question is should the Primary key be set to the ccp0_dynformfields _id and the Index key be set to the ccp0_dynformfields _form id to correct this problem?
I am a little out of my depth of knowledge in this particular area. I know I can fix it I just want to make sure that I am doing the right thing.
Any help would be greatly appreciated.
Offline
The id column is the only one that is a primary index (you may only have one primary key anyway). There should not be an additional index on that column (if there is it wasn't something done/created by CCP).
The number you mentioned isn't related to the error you are getting. There's a different setting for the maximum number of connections at the same time. CCP only makes a single connection to the database while a page is being built and delivered to a browser. If you are on a shared server it's quite likely that another domain on the same server is using something that is "eating" connections and not freeing them. I can assure you it isn't a problem/issue with CCP.
What check are you doing that is reporting a warning? What version of MySQL is being used? What version of phpMyAdmin is being used?
Offline
Hi Dave,
Thanks for the response.
We are using MySQL 5.0.45 and phpMyAdmin 2.8.0.1
I understand what you are saying and that has been my thoughts all along but did not know because it is showing a conflict with the index keys if that could be causing an overrun on our end.
Bacically what I am getting from phpMyAdmin in the ccp0_dynformfields table is
Indexes:
Keyname Type Cardinality Action Field
PRIMARY PRIMARY 9 Edit Drop id
id INDEX 9 Edit Drop id
!PRIMARY and INDEX keys should not both be set for column `id`
Jon
Offline
Drop the 2nd one. It didn't come from CCP and isn't needed. The primary key is both an index and assures uniqueness. In any case it isn't related to your connections problem though.
Offline
Thanks Dave,
Will do. I kind of had an idea but was not sure. Don't know where it came from as that is not something we ever modified. Just wanted to get some advice before I did something stupid.
On the connections problem that is a different story. But I have to fix the above so I can point out that it is not any of the scripting and try to get them to fix it on their end.
Jon
Offline
If you're on a shared server I'd have your provider check your "neighbors" too.
Offline
There are several commands in the linux server environment that can pinpoint who is connected to mysql so this should be easy for your host to tell who is using up the connections and not freeing them when they are done.... unless Perl/PHP/Python/etc. scripts are being run as the apache or the nobody user and then it gets harder to differentiate who is doing what.
Last edited by vbsaltydog (10-26-2009 21:05:32)
Offline
I think part of the problem aside from unfortunately having a shared server is that I have a new "neighbor" that is causing problems as this has just started up in the last month. And while everything runs under a unique user I think the hosting company is just being lazy.
New hosting company? Ya, but don't want to take the time at the moment. When we upgrade to ccp 7 I'll do that.
Thanks
Offline
Running as unique IDs has nothing to do with the problem. Chances are good that everyone on the server uses the same MySQL server which is likely on the same physical box. One poorly written or downloaded piece of code can affect everyone on the server. Hold your providers feet to the fire. As Stephen said, they have the tools and ability to find out who the real culprit is. You don't.
Offline
If you have the skills to run your own server then look into cloud servers from rackspace. They are VPS (Virtual Private Servers) that you setup through a web based interface. You could have your own server resources, root access, etc. that can run several sites very easily for around $40.00/month
Again, this would be a clean linux install so you would have to know how to install/configure/maintain apache,mysql,php,ftp,smtp,pop,iptables,etc. in order to use such a service but the price is right for a high availability server that you have full control over.
Offline