MySql Error

Found a bug? Tell us!!
Post Reply
Wizard
Regular
Posts: 103
Joined: Sat Aug 13, 2005 7:18 am
Location: Southern California
Contact:

MySql Error

Post by Wizard »

I've been using s9y for 2+ years now with no major problems to speak of. The product just works and works well. However in the past month I have been receiving this error just hitting the home page and sometimes trying to login.

Warning: mysql_connect(): Too many connections in /home/serendipity/include/db/mysql.inc.php on line 251

Warning: mysql_select_db(): Can't connect to local MySQL server through socket '/usr/local/mysql-5.0/data/mysql.sock' (2) in /home/serendipity/include/db/mysql.inc.php on line 252

Warning: mysql_select_db(): A link to the server could not be established in /home/serendipity/include/db/mysql.inc.php on line 252
DATABASE_ERROR

I use GoDaddy as my hosting service and after talking to them for a while it has been determined that even though I allow for 50 concurrent database logins the application (s9y) must not time out the logins it must use to display pages, plugings, etc.

Is there any cure for me? Nothing has been changed for a while (like over a year).
Wizard
My WeBlog
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: MySql Error

Post by garvinhicking »

Hi!

This error happens, because your MySQL server serves more connections than your provider allows. This means: You have too many visitors. Or too many spammers.

So, there are some options for you:

1. Ask the provider to raise the limit

2. Anayze your traffic and/or ask your provider to see if many spammers are hitting your site and if you can use IP-Bans or other means of DDoS combatting.

3. Reduce the number of event plugins / sidebar plugins that you use to lower your performance impact. I can only see your sidebar plugins, and the only one I spot that could impact performance is Photo Album (because it calls a foreign URL)

Also I see you're using serendipity 1.0 - there have been some performance improvements made in version 1.2, so maybe you can consider upgrading.


Regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
Wizard
Regular
Posts: 103
Joined: Sat Aug 13, 2005 7:18 am
Location: Southern California
Contact:

Post by Wizard »

Well, I tried upgrading to the latest version, but still no help. It was still erroring off now and then with the "too many database connections" error message.

I started to upgrade the plugins so that they would be up-to-date as well and noticed that it reported that I needed to upgrade a plugin that I used a long time ago that was used to spam my site about a year ago. I removed it from my configuration over a year ago. The email entry plugin and/or guestbook plugin was no longer in my configuration but still in the plugin folder.

So I guess you were right, I was being spammed (sp) but didn't know it. My concern is that when you remove a plugin from your configuration, it doesn't really remove it from the plugin folder, so it still can be accessed by spammers. I went into the folder structure and physically removed the plugin and my site is now running correctly (so far).

Is that normal practise, or perhaps it was a poorly written plugin?
Wizard
My WeBlog
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Post by garvinhicking »

Hi!
So I guess you were right, I was being spammed (sp) but didn't know it. My concern is that when you remove a plugin from your configuration, it doesn't really remove it from the plugin folder, so it still can be accessed by spammers. I went into the folder structure and physically removed the plugin and my site is now running correctly (so far).
The plugin will still be in the list of available plugins, and will be upgradable there - but it is NOT active unless you "activated" it so that the plugin sshows in your list of installed event plugins. The files are still there in that case, but cannot be accessed.

Physically removing those files shouldn't actually matter.

Regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
Wizard
Regular
Posts: 103
Joined: Sat Aug 13, 2005 7:18 am
Location: Southern California
Contact:

Post by Wizard »

Wow, that's what I thought. It shouldn't matter, but since physically removing the unused plugins from the plugin folder, my site now loads faster and I'm no longer having the error.

Must be serendipity, like the software name...
Serendipity is the effect by which one accidentally discovers something fortunate, especially while looking for something else entirely.
Wizard
My WeBlog
Post Reply