Search

Hi Guys

I've not had this issue before, but I was just doing a random check on my site and got this:

Symphony Database Error

There was a problem whilst attempting to establish a database connection. Please check all connection information is correct. The following error was returned:

1040: Too many connections

followed by:

Symphony Database Error

There was a problem whilst attempting to establish a database connection. Please check all connection information is correct. The following error was returned:

2002: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (11)

My site seems to be loading intermittently. Any ideas on what might have caused these errors and what I can do to prevent them?

Thanks! /tasha

@harshmallow - is this on your local machine or on your live server? If it's on the live server, is it a Shared Hosting Platform or a VPS?

This isn't a Symphony error, but a MySQL setting issue.

Your MySQL settings need to be tweaked.

http://stackoverflow.com/questions/14331032/mysql-error-1040-too-many-connection

Hey

Thanks for the reply.

I figured it would be a server issue, but wasn't sure how to fix it.

It's a shared hosting platform. I'll take a look at your suggestion!

/t

by the way, my config.php says:

###### DATABASE ######
    'database' => array(
        'host' => 'localhost',
        'port' => '3306',
        'user' => '',
        'password' => '',
        'db' => '',
        'sym_prefix' => 'sym_',
    ),
    ########

why you try to connect to db via socket? on a shared host this might be not possible.

why you try to connect to db via socket? on a shared host this might be not possible.

When connecting to db via socket you can use the config above. On my local development environment I am connecting via socket, and I can use the Symphony Database config with no problems.

You are right, and it's my fault. In production I have the ip.

So, my maxuserconnections is set to 40 and unfortunately, because I'm on shared hosting, I'm not allowed to change it. I can't imagine that I'm getting enough traffic for it to be a traffic issue.

The support team suggested changing the tables to InnoDB rather than MyISAM - would symphony fall over if I were to do this?

Thanks again guys! /t

Hey Tasha (long time no speak!)

There's an open issue to do that for the core, although we're in a limbo at present as to priorities for the next release. I need to catch up with others to see when to do these things.

A way for you to do this is to take a mysqldump of your database, ensuring that the drop table and create table queries are there for each table (Sequel Pro has them by default). Once you've done that, make a backup copy of the sql file, then you can manually go through the sql to change the MyISAM references to InnoDB.

I say manually, as you need to look out for any references to fulltext as a column type, as it isn't supported in InnoDB, and will break the import.

Once that's done, try and re-import it. Obviously, do it locally first to catch any mistakes or errors.

Duuuude! What's up! Seems my time with you was not wasted as I have carried on using what you taught me :D

Ok cool. Ta muchly. So I'm guessing anything that has fulltext I leave as myISAM?

I'll give this a whirl when I've got a couple of hours to panic and swear ;)

Cheers!

Yeah, just leave it as MyISAM and it will still work. There are a couple of fields that have fulltext indexes on them for faster searching, so they would break.

Also, could do with catching up with you, I'm therealdesignermonkey on google chat, or designermonkey-john on skype.

Catch ya later!

Cheers bud. I'll give it a whirl. Gulp. Watch this space.

I'll hit you up next week some time when I'm less busy. Or hit me up on tasha@ harshmallow.co.uk

Create an account or sign in to comment.

Symphony • Open Source XSLT CMS

Server Requirements

  • PHP 5.3-5.6 or 7.0-7.3
  • PHP's LibXML module, with the XSLT extension enabled (--with-xsl)
  • MySQL 5.5 or above
  • An Apache or Litespeed webserver
  • Apache's mod_rewrite module or equivalent

Compatible Hosts

Sign in

Login details