Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > ISPConfig 3 > General

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Reply
 
Thread Tools Display Modes
  #1  
Old 21st October 2012, 10:13
beenfishing beenfishing is offline
Member
 
Join Date: Jan 2010
Posts: 33
Thanks: 0
Thanked 2 Times in 2 Posts
Default Mysql problems on DB server

Good Day

I have started getting "could not connect to sql server" from my websites. If i restart sql, then it works again, sometimes for a day, sometimes only for an hour.

I have a multiserver setup on Debian 6, I've just updated to Ispconfig 3.0.4.6.

I am also getting these entries in my DB server when in debug mode.

2012-10-16 17:35 Warning DB::query(INSERT INTO monitor_data (server_id, type, created, data, state) VALUES (3, 'os_info', UNIX_TIMESTAMP(), 'a:2:{s:4:"name";s:6:"Debian";s:7:"version";s:11:" Squeeze/Sid";}', 'no_state')) -> mysql_query Duplicate entry '3-os_info-1350408928' for key 'PRIMARY'
2012-10-16 17:35 Warning DB::query(INSERT INTO monitor_data (server_id, type, created, data, state) VALUES (3, 'server_load', UNIX_TIMESTAMP(), 'a:8:{s:7:"up_days";d:4;s:8:"up_hours";d:9;s:10:"u p_minutes";d:33;s:6:"uptime";s:70:" 19:35:24 up 4 days, 9:33, 1 user, load average: 10.05, 7.98, 4.44n";s:11:"user_online";i:1;s:6:"load_1";d:10.05 0000000000000710542735760100185871124267578125;s:6 :"load_5";d:7.980000000000000426325641456060111522 674560546875;s:7:"load_15";d:4.4400000000000003907 9850466805510222911834716796875;}', 'ok')) -> mysql_query Duplicate entry '3-server_load-1350408927' for key 'PRIMARY'
2012-10-16 17:35 Warning DB::query(INSERT INTO monitor_data (server_id, type, created, data, state) VALUES (3, 'ispc_info', UNIX_TIMESTAMP(), 'a:2:{s:4:"name";s:9:"ISPConfig";s:7:"version";s:7 :"3.0.4.4";}', 'no_state')) -> mysql_query Duplicate entry '3-ispc_info-1350408927' for key 'PRIMARY'
2012-10-16 17:35 Warning DB::query(INSERT INTO monitor_data (server_id, type, created, data, state) VALUES (3, 'ispc_info', UNIX_TIMESTAMP(), 'a:2:{s:4:"name";s:9:"ISPConfig";s:7:"version";s:7 :"3.0.4.4";}', 'no_state')) -> mysql_query Duplicate entry '3-ispc_info-1350408927' for key 'PRIMARY'
2012-10-16 17:35 Warning DB::query(INSERT INTO monitor_data (server_id, type, created, data, state) VALUES (3, 'os_info', UNIX_TIMESTAMP(), 'a:2:{s:4:"name";s:6:"Debian";s:7:"version";s:11:" Squeeze/Sid";}', 'no_state')) -> mysql_query Duplicate entry '3-os_info-1350408927' for key 'PRIMARY'
2012-10-16 17:35 Warning DB::query(INSERT INTO monitor_data (server_id, type, created, data, state) VALUES (3, 'os_info', UNIX_TIMESTAMP(), 'a:2:{s:4:"name";s:6:"Debian";s:7:"version";s:11:" Squeeze/Sid";}', 'no_state')) -> mysql_query Duplicate entry '3-os_info-1350408927' for key 'PRIMARY'
2012-10-16 17:35 Warning DB::query(INSERT INTO monitor_data (server_id, type, created, data, state) VALUES (3, 'server_load', UNIX_TIMESTAMP(), 'a:8:{s:7:"up_days";d:4;s:8:"up_hours";d:9;s:10:"u p_minutes";d:33;s:6:"uptime";s:70:" 19:35:24 up 4 days, 9:33, 1 user, load average: 10.05, 7.98, 4.44n";s:11:"user_online";i:1;s:6:"load_1";d:10.05 0000000000000710542735760100185871124267578125;s:6 :"load_5";d:7.980000000000000426325641456060111522 674560546875;s:7:"load_15";d:4.4400000000000003907 9850466805510222911834716796875;}', 'ok')) -> mysql_query Duplicate entry '3-server_load-1350408926' for key 'PRIMARY'
2012-10-16 17:35 Warning DB::query(INSERT INTO monitor_data (server_id, type, created, data, state) VALUES (3, 'server_load', UNIX_TIMESTAMP(), 'a:8:{s:7:"up_days";d:4;s:8:"up_hours";d:9;s:10:"u p_minutes";d:33;s:6:"uptime";s:70:" 19:35:25 up 4 days, 9:33, 1 user, load average: 10.05, 7.98, 4.44n";s:11:"user_online";i:1;s:6:"load_1";d:10.05 0000000000000710542735760100185871124267578125;s:6 :"load_5";d:7.980000000000000426325641456060111522 674560546875;s:7:"load_15";d:4.4400000000000003907 9850466805510222911834716796875;}', 'ok')) -> mysql_query Duplicate entry '3-server_load-1350408926' for key 'PRIMARY'

Any assistance would be greatly appreciated as I have been trying to sort this problem out for nearly a week now.
Reply With Quote
Sponsored Links
  #2  
Old 21st October 2012, 12:40
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,747 Times in 2,578 Posts
Default

Does your server have enough RAM? Have you tried to optimize your MySQL settings?
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
  #3  
Old 21st October 2012, 12:42
beenfishing beenfishing is offline
Member
 
Join Date: Jan 2010
Posts: 33
Thanks: 0
Thanked 2 Times in 2 Posts
Default

Thanks so much for your response.

I think so, it's got 4GB, it's not a very busy server, how much ram do you think I need and how do I optimize MySQL?
Reply With Quote
  #4  
Old 21st October 2012, 19:35
till till is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lneburg, Germany
Posts: 36,796
Thanks: 840
Thanked 5,613 Times in 4,424 Posts
Default

Try to set

max_connections = 500
max_user_connctions = 500

in the [mysqld] section of the mysql my.cnf file and restart mysql.
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
  #5  
Old 21st October 2012, 23:05
beenfishing beenfishing is offline
Member
 
Join Date: Jan 2010
Posts: 33
Thanks: 0
Thanked 2 Times in 2 Posts
 
Default

I have made the changes, will see how it goes and will let you know if it happens again.

Thanks again for your assistance, really appreciate it.
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
500 internal error after upgrade abintipl Installation/Configuration 9 18th July 2012 13:51
Sending email issue lezelf Installation/Configuration 15 9th August 2011 12:20
CPU load locks up box. Apache or MYSQL related. crypted General 61 29th October 2010 23:16
I don't recieve mail. privir Installation/Configuration 2 3rd June 2009 23:08
What can be wrong martin_rudowicz Installation/Configuration 9 11th May 2008 20:42


All times are GMT +2. The time now is 07:54.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.