MySQL Memory Leak?

Discussion in 'MySQL' started by digitalpoint, Jul 7, 2005.

  1. #1
    Has anyone had any experience with mysqld getting slower over time until you restart the process finally?

    The database server process for this forum ran for about 120 days (under moderate load: Queries per second avg: 109.454), slowly getting slower, until this morning I couldn't stand it anymore and after trying everything else, I restarted the mysqld process, and instantly everything is fast again.

    That really sucks IMO... I'm hoping it's a bug in the current version I'm using or something (4.1.10), so I'm off to go dig through MySQL's bug database to see if it's been fixed.

    Just wondering if anyone else has experienced the same thing?
     
    digitalpoint, Jul 7, 2005 IP
  2. piniyini

    piniyini Well-Known Member

    Messages:
    514
    Likes Received:
    26
    Best Answers:
    0
    Trophy Points:
    170
    #2
    is this why the forum was down for a bit earlier?
     
    piniyini, Jul 7, 2005 IP
  3. digitalpoint

    digitalpoint Overlord of no one Staff

    Messages:
    38,334
    Likes Received:
    2,613
    Best Answers:
    462
    Trophy Points:
    710
    Digital Goods:
    29
    #3
    Technically it wasn't down, just so slow it looked like it was down. hehe... but yeah. :)
     
    digitalpoint, Jul 7, 2005 IP
  4. chiefshuddle

    chiefshuddle Banned

    Messages:
    338
    Likes Received:
    11
    Best Answers:
    0
    Trophy Points:
    0
    #4
    The only thing I saw in the bug DB on that version was this.

    http://bugs.mysql.com/bug.php?id=9594

    I am running 4.0.22 and haven't had any issues with a pretty large DB for 220 days and counting.
     
    chiefshuddle, Jul 7, 2005 IP
  5. noppid

    noppid gunnin' for the quota

    Messages:
    4,246
    Likes Received:
    232
    Best Answers:
    0
    Trophy Points:
    135
    #5
    Perhaps you just explained an issue on my shared server we have not pinpointed. Apache seems up and ftp seems up but the forum don't respond and throws mysql errors.

    I'll check the details. Thanks for the heads up.
     
    noppid, Jul 7, 2005 IP
  6. chiefshuddle

    chiefshuddle Banned

    Messages:
    338
    Likes Received:
    11
    Best Answers:
    0
    Trophy Points:
    0
    #6
    I had a similar issue on my provider when I was running a shared service. It ended up being that the mount point for the tmp directory was corrupting because it was not large enough for all the people sharing the database server.

    You might have them check that as well. :)
     
    chiefshuddle, Jul 8, 2005 IP
  7. Shoemoney

    Shoemoney $

    Messages:
    4,474
    Likes Received:
    588
    Best Answers:
    0
    Trophy Points:
    295
    #7
    using Ver 14.7 Distrib 4.1.11, for pc-linux-gnu (i386) here.

    mysqlbox:~# uptime
    11:44:17 up 84 days, 14:46, 3 users, load average: 3.52, 4.24, 3.79

    Queries per second avg 175.233

    I maybe totally irrelivent though shawn because I do a backup everynight that stops the server, tars up the d b dir and then restarts it. While this happens it fails over to one of the slave db servers for the 1-2 mins of downtime.
     
    Shoemoney, Jul 9, 2005 IP
  8. nddb

    nddb Peon

    Messages:
    803
    Likes Received:
    30
    Best Answers:
    0
    Trophy Points:
    0
    #8
    I don't see this in a few versions back from 4.1.10, I've run it for months with fractional load on cpu and memory.
     
    nddb, Jul 10, 2005 IP
  9. digitalpoint

    digitalpoint Overlord of no one Staff

    Messages:
    38,334
    Likes Received:
    2,613
    Best Answers:
    462
    Trophy Points:
    710
    Digital Goods:
    29
    #9
    Why are you taking down the db server? You can do a hot backup just fine...

    Anyway, it happened again, so I just upgraded to MySQL 4.1.14. Hopefully whatever was causing it was fixed since 4.1.10. :)
     
    digitalpoint, Aug 25, 2005 IP
  10. Shoemoney

    Shoemoney $

    Messages:
    4,474
    Likes Received:
    588
    Best Answers:
    0
    Trophy Points:
    295
    #10
    Well DP I like to do a full raw backup... tar /var/lib/mysql nightly.

    it rolls over to the slave for the 1 min of downtime and I have a good backup.

    I had a really bad experience with using mysqldump tools...
     
    Shoemoney, Aug 25, 2005 IP
  11. ozegreatdeals

    ozegreatdeals Peon

    Messages:
    326
    Likes Received:
    12
    Best Answers:
    0
    Trophy Points:
    0
    #11
    I run a couple of websites powered by mysql databases and one of them I have had no problems with apart from when lots of users login then the database won't connect anymore users.. The other one had a similar problem to mentioned above.. The site ran slower and slower and then stop accepting connections all together, even when "optimizing" database and clearing cache the site still refused to run. So I moved hosts and then it is all ok now and the database is busier then ever.

    Drew.
     
    ozegreatdeals, Aug 26, 2005 IP
  12. asyrov

    asyrov Peon

    Messages:
    63
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    0
    #12
    I know this is old thread, but since we have 2 Mysql Gurus here.... (well at least people that had experience with it)...

    I am running mysqlhotcopy every night and since tar.gz version of the DB is ~ 5Gb it takes a while to back it up (~30 min) (copy/tar.gz/send to remote computer). As you know mysql hotcopy locks all the tables in DB and makes copy of all phys files in /data/ directory.

    I am wondering if there is any better way .... Trying to escape downtime without installing a second server.

    I have not tried using mysqldump, but suspect that with dump backup will take longer and will be much bigger.

    And a Q to Shomoney: if you run everything to slave server for 2-5 minutes, are you able to insert/update any records in slave and if yes, how do you propagate those updates to primary when it comes up.
     
    asyrov, Sep 3, 2006 IP