Results 1 to 14 of 14
  1. #1

    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.

  2. #2
    Join Date
    Nov 2009
    Location
    /etc/my.cnf
    Posts
    10,657
    Quote Originally Posted by Yasmin_Hosticulture View Post
    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?
    Whats the contents of your "my.cnf"

    Whats the PHP Memory Limit set at?

    Regards,
    UK Based Proactive Server Management.
    Zabbix Enterprise 24/7 Monitoring.

  3. #3
    Quote Originally Posted by cd/home View Post
    Whats the contents of your "my.cnf"

    Whats the PHP Memory Limit set at?

    Regards,
    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
    And I am not sure about the other question. That is what I would like to know. How to increase the limit given to mysql.
    Nothin much.

  4. #4
    Join Date
    Nov 2009
    Location
    /etc/my.cnf
    Posts
    10,657
    Quote Originally Posted by Yasmin_Hosticulture View Post
    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
    And I am not sure about the other question. That is what I would like to know. How to increase the limit given to mysql.

    You might want to consider getting MySQL + Tables optimized first
    UK Based Proactive Server Management.
    Zabbix Enterprise 24/7 Monitoring.

  5. #5
    Quote Originally Posted by cd/home View Post
    You might want to consider getting MySQL + Tables optimized first
    You don't have any link your sig. I am looking to hire a management company anyway for small tasks. I am pretty sure you wouldn't provide full fix here since that kills your own business .

    So PM with your URL or better skype (any other messenger for that matter).
    Nothin much.

  6. #6
    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.

  7. #7
    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

  8. #8

    *

    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.

  9. #9
    Join Date
    Apr 2004
    Location
    Singapore
    Posts
    1,234
    For cpanel server, try mysqltuner

    # /usr/local/cpanel/3rdparty/mysqltuner/mysqltuner.pl

  10. #10
    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

  11. #11
    mysqltuner works great

  12. #12
    Join Date
    Jun 2012
    Posts
    174
    What kind of error message?
    What do you see in syslog?

  13. #13
    You should post the error message here so we can help.

  14. #14

    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

  1. VPS running out of memory :(
    By sexyflanders in forum VPS Hosting
    Replies: 10
    Last Post: 05-09-2011, 06:03 PM
  2. MySQL is frequently Down
    By oxpai in forum Hosting Security and Technology
    Replies: 4
    Last Post: 06-22-2009, 06:58 AM
  3. Physical memory running out
    By matthisco in forum Web Hosting
    Replies: 14
    Last Post: 05-15-2009, 04:41 AM
  4. Replies: 4
    Last Post: 10-13-2006, 09:05 PM
  5. 2G of Memory - Only Running MySQL - 3/4 of RAM eaten up?
    By quid246 in forum Hosting Security and Technology
    Replies: 0
    Last Post: 09-03-2006, 04:02 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •