Results 1 to 14 of 14
-
06-08-2012, 07:47 AM #1Junior Guru Wannabe
- Join Date
- Feb 2012
- Posts
- 58
mySQL running out of memory frequently.
Hello,
Its a brand new server that we deployed and migrated about 1000 domains to it. Server is of 8 CPU and 24GB DDR3 RAM. Load averages only around 1- 2.0.
Problem is, it frequenty runs out of memory and displays error on the websites and phpmyadmin about SQL being out of memory.
Can someone guide me how do we go about fixing that? Theres PLENTY of RAM on the server which is not being utilized so how do I allocate more to mySQL?Nothin much.
-
06-08-2012, 07:55 AM #2Hello World
- Join Date
- Nov 2009
- Location
- /etc/my.cnf
- Posts
- 10,657
-
06-08-2012, 08:03 AM #3Junior Guru Wannabe
- Join Date
- Feb 2012
- Posts
- 58
Thanks for reply. my.cnf seems pretty small and here's what I got in it.
Code:[mysqld] set-variable = max_connections=500 log-slow-queries safe-show-database
Nothin much.
-
06-08-2012, 08:12 AM #4Hello World
- Join Date
- Nov 2009
- Location
- /etc/my.cnf
- Posts
- 10,657
-
06-08-2012, 08:20 AM #5Junior Guru Wannabe
- Join Date
- Feb 2012
- Posts
- 58
Nothin much.
-
06-12-2012, 04:52 AM #6Disabled
- Join Date
- Oct 2011
- Location
- Vilnius
- Posts
- 152
What was the exact memory shortage message? There could be several options. One of them is ofcourse php memory limit, another on cloud be mysql max package site limit. So it depends on exact error.
-
06-12-2012, 10:51 AM #7Problem Solver
- Join Date
- Mar 2003
- Location
- California USA
- Posts
- 13,681
Are you running a 32bit or 64bit OS? If you are running a 32bit OS mysql is limited in the amount of ram it can consume.
Steven Ciaburri | Industry's Best Server Management - Rack911.com
Software Auditing - 400+ Vulnerabilities Found - Quote @ https://www.RACK911Labs.com
Fully Managed Dedicated Servers (Las Vegas, New York City, & Amsterdam) (AS62710)
FreeBSD & Linux Server Management, Security Auditing, Server Optimization, PCI Compliance
-
07-12-2012, 09:51 AM #8Newbie
- Join Date
- Jul 2012
- Posts
- 27
To tackle this from a different angle, if you don't want to deal with configuration, allocating memory, etc. in MySQL, there are several options out there for MySQL database services (e.g. http://www.xeround.com, http://aws.amazon.com/rds/), which are in-memory and manage the memory provisioning for you, so you'll never "run out of memory", and even if you need more memory, they will allocate it.
-
07-12-2012, 12:31 PM #9Web Hosting Master
- Join Date
- Apr 2004
- Location
- Singapore
- Posts
- 1,234
For cpanel server, try mysqltuner
# /usr/local/cpanel/3rdparty/mysqltuner/mysqltuner.pl
-
07-14-2012, 08:26 AM #10Web Hosting Master
- Join Date
- Mar 2005
- Location
- Ten1/0/2
- Posts
- 2,529
Assuming a linux server (you have not said)
Find and install tuning-primer.sh and mysqltuner.pl and use them to sort out your mysql config.
I will give you a hint - tuning mysql on a server can take a couple of weeks initially, and should be checked every few weeks to make sure all is well - it is just one of those ongoing sysadmin tasks.CPanel Shared and Reseller Hosting, OpenVZ VPS Hosting. West Coast (LA) Servers and Nodes
Running Linux since 1.0.8 Kernel!
Providing Internet Services since 1995 and Hosting Since 2004
-
07-14-2012, 11:53 AM #11WHT Addict
- Join Date
- Jul 2012
- Posts
- 107
mysqltuner works great
-
07-14-2012, 02:55 PM #12WHT Addict
- Join Date
- Jun 2012
- Posts
- 174
What kind of error message?
What do you see in syslog?
-
07-14-2012, 03:12 PM #13Newbie
- Join Date
- Aug 2011
- Location
- /proc
- Posts
- 16
You should post the error message here so we can help.
-
07-14-2012, 08:12 PM #14Disabled
- Join Date
- Jul 2011
- Posts
- 202
Watch MySQL Plug-in
Hello,
try Watch MySQL Plug-in, This plugin gives administrators the ability to monitor concurrent user connections to MySQL. The WatchMySQL daemon can be configured so that when a user exceeds theire connection limit a notification is sent to the administrator and/or user. The daemon can also be configured so that it will kill off those connections. Limits can be set per user, per package, or globally.
Similar Threads
-
VPS running out of memory :(
By sexyflanders in forum VPS HostingReplies: 10Last Post: 05-09-2011, 06:03 PM -
MySQL is frequently Down
By oxpai in forum Hosting Security and TechnologyReplies: 4Last Post: 06-22-2009, 06:58 AM -
Physical memory running out
By matthisco in forum Web HostingReplies: 14Last Post: 05-15-2009, 04:41 AM -
VPS often running slow or running out of memory
By remi in forum VPS HostingReplies: 4Last Post: 10-13-2006, 09:05 PM -
2G of Memory - Only Running MySQL - 3/4 of RAM eaten up?
By quid246 in forum Hosting Security and TechnologyReplies: 0Last Post: 09-03-2006, 04:02 AM