Jump to content

Max Connections Problems MYSQL Cubecart


masterunix

Recommended Posts

Hello All,

 

I have run Cubecart on my dedicated hosting for a long time now without many problems.

 

However starting from today i have a huge problem.

 

All my websites connected with SQL will have a problem ... saying max connections limit blabla.

 

However ... we conacted the hosting and they changed it from max connection 25 to the limit 100.

 

This helped for 1 hour and then it didnt work anymore ... same problem.

 

I contacted my hosting company again and they found out the the username from one of my cubecart website is causing this problem to rerule the max connections to set as limit 10. This is causing the whole server to colapse.

 

So after a long talk with hosting ... they same i need to talk with my "programmer" about this issue ...

 

Can anyone help me to let cubecart optimize the cubecart site to get well with max connection usages?

 

See attachment of the converstation i had with my hosting company.

 

Please do not recommand me to get another hosting (yet) i already changed MANY times in MANY years and we have HUGE websites! I just want a solution to fix this ... if i am stuck in the end i will sell all websites, because after many years i am done with it and i need more rest then stressful headaches running webshops and websites.

 

Thank you for your support and reading this.

hosting.txt

Link to comment
Share on other sites

ps: i forgot to mention i have more websites running on opencart and i must say i never had any problem with those ... so it all makes it complicated.

 

If i turn down the cubecart websites everything is running fine ... :(

Link to comment
Share on other sites

Hi

CubeCart in common with many / most applications doesnt close database connections but having max_connections set to 25 on a dedicated server running in your words "multiple large CubeCart websites would never work. That parameter can and should be increased but by itself it could cause problems as by the sound of it your server and my.cnf has never been configured and tuned for high MySQL throughput websites.

Your hosting company should have been able to provide more information about this by examining server logs but by the sound of the conversation you dont have managed support and they arent being overly proactive to help.

You need an expert in tuning the Linux side of the server and also my.cnf based on your server hardware spec (assuming the server is up to the job).

Thanks

Ian

Link to comment
Share on other sites

@havenswift

 

Are you able to do the job? Tweaking it to get it right?

 

If so please pm me for the price.

 

Also tell me if its possible to fix it ... if not i need to get rid of some websites.

 

Please get back to me asap,

Link to comment
Share on other sites

Would you try either of these experiments? And are all your CubeCart installations at v5? In admin, Server Info (PHP Info), scroll to MySQL. Is it 'mysql' or mysqli'?

 

In your php.ini file, enable the MYSQLI extension. CubeCart will use PHP's MySQLi method of connecting to the database server in favor of the MySQL method. MySQLi may have better user management -- I don't know if that's true.

 

Don't disable the MySQL extension becasue it might be the case that other non-CubeCart applications may only want to use MySQL.

 

Or, try this -- both the mysql.class.php and mysqli.class.php have their close() methods, but as best I can tell, CubeCart doesn't use them. (However, this command may be in the encoded files.) If that's the case, CubeCart relies on PHP that, when PHP is shutting down, PHP will properly terminate the connections to the database. Let's assume that relying on PHP is a mistake.

 

In the file /class/db/database.class.php, near line 81, edit:

Was:
public function __destruct() { }
Now:
public function __destruct() { $this->close(); }

I haven't tried this because I do not have the same environment as your server, so any test on my part wouldn't reveal anything.

Link to comment
Share on other sites

I am pretty sure the problem is that i have a dedicated server and ofcourse it is unmanaged ... and i am not a linux administrator (however i am a skilled linux user, but i never worked for a hosting company or played with serious settings and stuff).

 

I think i need someone who need to check out the dedicated server settings and set them up in the correct way.

 

If there is someone reading this and feeling he can help me out, then please drop a message with your price to help me out.

 

I am looking for a linux administrator with dedicated server experiences.

 

@bsmither

 

i will look at your solutions later ... i think the serious problem is the settings of the dedicated server in general ... after this has been fixed i can tweak up cubecart to make it better.

Link to comment
Share on other sites

I am pretty sure the problem is that i have a dedicated server and ofcourse it is unmanaged

 

I think i need someone who need to check out the dedicated server settings and set them up in the correct way.

 

If there is someone reading this and feeling he can help me out, then please drop a message with your price to help me out.

 

I am looking for a linux administrator with dedicated server experiences.

I will drop you a pm - we have experience of tuning dedicated servers for some VERY large CubeCart websites plus also for our range of shared hosting servers running mainly CubeCart sites (It is what we specialise in !) but to be honest whether it is possible depends on the hardware spec of your server and it is also impossible to give a fixed priced quote without knowing the state of your server and setup

Thanks

Ian

Link to comment
Share on other sites

@havenswift-hosting

 

Thank you for your answers and posting.

 

I didn't know my server was unmanaged and that caused many problems.

 

Now i hired a freelancer for a fixed price from Canada to fix it and i was lucky it was an expert on his word. Everything is running faster then before and no downtimes anymore!

 

However ... IF there is a problem like this before i would like to be your customer (havenswift-hosting).

 

Please send me a nice deal you have for a dedicated hosting WITH managed support.

 

Since you focus on cubecart ... will opencart websites run smoothly as well on your server? We have more websites and not everything is in cubecart.

 

Thanks all for your support!

Link to comment
Share on other sites

Hi

Glad you got that problem fixed but running an unmanaged server (whether dedicated or a vps) unless you are an experienced linux administrator will leave you open to these types of things but worse still a huge number of security risks.

While we are CubeCart specialists, Opencart is not that different at a server configuration and database tuning level and we have quite a few hosting clients running it so there would be no problem at all.

More than happy to have a chat with you about a suitable server and managed hosting package but would need a lot more information about your current server, websites and server setup / load etc. If you are considering moving hosting then it is always better to do it when there are no problems rather than when in panic mode when there is a problem. We would build the server and then move a few sites across at a time to ensure no issues.

If you are interested in exploring options then can you contact me via our website where we can discuss via live chat or better still support ticket.

Thanks

Ian

Link to comment
Share on other sites

  • 1 month later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...