Kryptronic Software Support Forum

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.

#1 10-26-2009 08:16:40

troublecreek
Member
Registered: 04-18-2008
Posts: 10

Questions about database and MySQL problems

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

 

#2 10-26-2009 08:29:30

Dave
Member
Registered: 07-05-2003
Posts: 11233

Re: Questions about database and MySQL problems

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

 

#3 10-26-2009 08:43:21

troublecreek
Member
Registered: 04-18-2008
Posts: 10

Re: Questions about database and MySQL problems

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

 

#4 10-26-2009 08:51:00

Dave
Member
Registered: 07-05-2003
Posts: 11233

Re: Questions about database and MySQL problems

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

 

#5 10-26-2009 17:44:15

troublecreek
Member
Registered: 04-18-2008
Posts: 10

Re: Questions about database and MySQL problems

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

 

#6 10-26-2009 17:50:21

Dave
Member
Registered: 07-05-2003
Posts: 11233

Re: Questions about database and MySQL problems

If you're on a shared server I'd have your provider check your "neighbors" too.

Offline

 

#7 10-26-2009 21:01:28

vbsaltydog
Member
From: Florida
Registered: 05-02-2005
Posts: 947
Website

Re: Questions about database and MySQL problems

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)


Latest CCP 7 XMods Available:


Offline

 

#8 10-27-2009 07:49:35

troublecreek
Member
Registered: 04-18-2008
Posts: 10

Re: Questions about database and MySQL problems

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

 

#9 10-27-2009 07:57:28

Dave
Member
Registered: 07-05-2003
Posts: 11233

Re: Questions about database and MySQL problems

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

 

#10 10-27-2009 09:18:14

vbsaltydog
Member
From: Florida
Registered: 05-02-2005
Posts: 947
Website

Re: Questions about database and MySQL problems

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.


Latest CCP 7 XMods Available:


Offline

 

Board footer