Professional Web Applications Themes

Out of memory - MySQL

I just attached memory to a server and now it has 4 GB RAM. Additionally I changed the settings in /etc/mysql/my.cnf to: innodb_buffer_pool_size = 2000M innodb_log_file_size = 512M ...and everything seems to work. But the syslog says: Oct 9 10:25:55 dist mysqld_safe[10383]: started Oct 9 10:25:57 dist mysqld[10386]: 061009 10:25:57 InnoDB: Started; log sequence number 14 1385724950 Oct 9 10:25:57 dist mysqld[10386]: ^G/usr/sbin/mysqld: Out of memory (Needed 463827968 bytes) Oct 9 10:25:57 dist mysqld[10386]: ^G/usr/sbin/mysqld: Out of memory (Needed 347870208 bytes) Oct 9 10:25:57 dist mysqld[10386]: ^G/usr/sbin/mysqld: Out of memory (Needed 260901888 bytes) Oct 9 10:25:57 dist mysqld[10386]: ^G/usr/sbin/mysqld: Out ...

  1. #1

    Default Out of memory

    I just attached memory to a server and now it has 4 GB RAM. Additionally
    I changed the settings in /etc/mysql/my.cnf to:

    innodb_buffer_pool_size = 2000M
    innodb_log_file_size = 512M

    ...and everything seems to work. But the syslog says:

    Oct 9 10:25:55 dist mysqld_safe[10383]: started
    Oct 9 10:25:57 dist mysqld[10386]: 061009 10:25:57 InnoDB: Started;
    log sequence number 14 1385724950
    Oct 9 10:25:57 dist mysqld[10386]: ^G/usr/sbin/mysqld: Out of memory
    (Needed 463827968 bytes)
    Oct 9 10:25:57 dist mysqld[10386]: ^G/usr/sbin/mysqld: Out of memory
    (Needed 347870208 bytes)
    Oct 9 10:25:57 dist mysqld[10386]: ^G/usr/sbin/mysqld: Out of memory
    (Needed 260901888 bytes)
    Oct 9 10:25:57 dist mysqld[10386]: ^G/usr/sbin/mysqld: Out of memory
    (Needed 195674112 bytes)
    Oct 9 10:25:57 dist mysqld[10386]: 061009 10:25:57 [Note]
    /usr/sbin/mysqld: ready for connections.
    Oct 9 10:25:57 dist mysqld[10386]: Version:
    '5.0.22-Debian_0ubuntu6.06.2-log' socket: '/var/run/mysqld/mysqld.sock'
    port: 3306 Debian Etch distribution
    Oct 9 10:25:57 dist /etc/mysql/debian-start[10430]: Running MySQL
    upgrade script in the background...
    Oct 9 10:25:57 dist /etc/mysql/debian-start[10434]: This script updates
    all the mysql privilege tables to be usable by
    Oct 9 10:25:57 dist /etc/mysql/debian-start[10434]: MySQL 4.0 and above.
    Oct 9 10:25:57 dist /etc/mysql/debian-start[10434]:
    Oct 9 10:25:57 dist /etc/mysql/debian-start[10434]: This is needed if
    you want to use the new GRANT functions,
    Oct 9 10:25:57 dist /etc/mysql/debian-start[10434]: CREATE AGGREGATE
    FUNCTION, stored procedures, or
    Oct 9 10:25:57 dist /etc/mysql/debian-start[10434]: more secure
    passwords in 4.1
    Oct 9 10:25:57 dist /etc/mysql/debian-start[10434]:
    Oct 9 10:25:58 dist /etc/mysql/debian-start[10434]: done
    Oct 9 10:25:58 dist /etc/mysql/debian-start[10458]: Checking for
    crashed MySQL tables in the background.

    The server runs on Ubuntu Dapper Drake Server.
    uname -a
    Linux dist.ist.tugraz.at 2.6.15-25-server

    rootdist:/var/lib/mysql # cat /proc/meminfo
    MemTotal: 4150640 kB
    MemFree: 261960 kB
    Buffers: 22184 kB
    Cached: 2973692 kB
    SwapCached: 0 kB
    Active: 901284 kB
    Inactive: 2933632 kB
    HighTotal: 3276736 kB
    HighFree: 4256 kB
    LowTotal: 873904 kB
    LowFree: 257704 kB
    SwapTotal: 1951736 kB
    SwapFree: 1951736 kB
    Dirty: 80 kB
    Writeback: 0 kB
    Mapped: 849204 kB
    Slab: 37524 kB
    CommitLimit: 4027056 kB
    Committed_AS: 2819568 kB
    PageTables: 2564 kB
    VmallocTotal: 118776 kB
    VmallocUsed: 6252 kB
    VmallocChunk: 112308 kB

    Any hints regarding the "Out of memory" lines?

    Thx, best
    Bernhard

    Bernhard Guest

  2. #2

    Default Re: Out of memory


    Bernhard Kornberger wrote: 

    I don't know a great deal about these things, but I will give you my 2
    cents anyway to see if I can help.

    Have you restarted the MySQL daemon since you made these changes? The
    changes should be loaded only once the daemon has been restarted.

    Hope this helps.

    Daz.

    Daz Guest

  3. #3

    Default Re: Out of memory


    Bernhard Kornberger wrote: 

    I have recently started learning how to use MySQL, but I am not sure
    how it actually works. I might just be me being a noob, but it strikes
    me as odd that mysqld is hogging so much RAM. I am wondering whether
    there is a maximum setting you can actually use for the
    innodb_buffer_pool_size and that it's maybe being overridden by this
    factor each time.

    Another thing to look into might be the overheads that are used by the
    database. With that said, it wouldn't explain why you get a memory
    error everytime MySQL wants more than 250MB of RAM to use. I can only
    suggest that you either:
    Restart mysqld.
    Check to see if there is a maximum setting that's overriding yours.
    (perhaps in a master file somewhere, as you could be editing the wrong
    one)?
    Check that the changes you made are still in place, in the file that
    you edited after restarting mysqld.
    Check that there are no limitaions on the system you are using (perhaps
    some kind of protection against possible memory leaks?)

    Daz Guest

  4. #4

    Default Re: Out of memory


    Daz wrote: 
    >
    > I have recently started learning how to use MySQL, but I am not sure
    > how it actually works. I might just be me being a noob, but it strikes
    > me as odd that mysqld is hogging so much RAM. I am wondering whether
    > there is a maximum setting you can actually use for the
    > innodb_buffer_pool_size and that it's maybe being overridden by this
    > factor each time.
    >
    > Another thing to look into might be the overheads that are used by the
    > database. With that said, it wouldn't explain why you get a memory
    > error everytime MySQL wants more than 250MB of RAM to use. I can only
    > suggest that you either:
    > Restart mysqld.
    > Check to see if there is a maximum setting that's overriding yours.
    > (perhaps in a master file somewhere, as you could be editing the wrong
    > one)?
    > Check that the changes you made are still in place, in the file that
    > you edited after restarting mysqld.
    > Check that there are no limitaions on the system you are using (perhaps
    > some kind of protection against possible memory leaks?)[/ref]

    Another thing I just noticed: 

    Perhaps MySQL running in safemode could be a problem?

    Daz Guest

  5. #5

    Default Re: Out of memory

    Bernhard Kornberger <tugraz.at> wrote:
     

    What platform is it? Since mysqld is a single process (but multi
    threads) there is a memory limit on 32-bit platforms. However, with
    2000MB innodb_buffer_pool_size you should be within the limit.
     

    Looks strange. However it's the same process (#10386) all the time.
    So mysqld tries to allocate memory but does not get it. Then mysqld
    decreases the amount of memory until it finally succeds.

    Maybe there is a memory limit on your system? What do you get for
    'ulimit -a' ?


    XL
    --
    Axel Schwenke, Senior Software Developer, MySQL AB

    Online User Manual: http://dev.mysql.com/doc/refman/5.0/en/
    MySQL User Forums: http://forums.mysql.com/
    Axel Guest

Similar Threads

  1. Flash Player 8 huge memory using during drag (all memory gone in few minutes) !!!
    By LSopko@1024Informatica.com in forum Macromedia Flash Player
    Replies: 0
    Last Post: June 13th, 09:42 AM
  2. Memory consumption of Ruby/mod_ruby combo on Apache [memory leak]
    By David Heinemeier Hansson in forum Ruby
    Replies: 4
    Last Post: September 10th, 01:58 AM
  3. Replies: 1
    Last Post: June 26th, 04:00 AM
  4. perl memory management - does array = () free the memory?
    By Matt Oefinger in forum Perl / CGI
    Replies: 0
    Last Post: June 25th, 09:11 PM

Bookmarks

Posting Permissions

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

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139