New user's registration have been closed due to high spamming and low trafic on this forum. Please contact forum admins directly if you need an account. Thanks !

High mysqld cpu usage after reboot

Got problems with your B2 or B3? Share and get helped!
Post Reply
RandomUsername
Posts: 904
Joined: 09 Oct 2009, 18:49

High mysqld cpu usage after reboot

Post by RandomUsername »

Hi,

As mentioned here: http://forum.excito.net/viewtopic.php?f ... =15#p10309 after upgrading my B2 to the latest version and I rebooted, the mysqld process went wild until I restarted it.

I had to reboot the server today and the same thing is happening, it's using as much of the CPU as it can get its hands on.

I'm a total mysql noob so I don't really know what to do to troubleshoot this. I've installed mytop but can't really see anything odd in the output of that.

in mysql,

Code: Select all

show fullprocesslist
gives this:

Code: Select all

mysql> show full processlist;
+----+-----------+-----------+-----------+---------+------+--------------+-------------------------------------------------------------+
| Id | User      | Host      | db        | Command | Time | State        | Info                                                        |
+----+-----------+-----------+-----------+---------+------+--------------+-------------------------------------------------------------+
| 60 | mediatomb | localhost | mediatomb | Query   |    1 | Sending data | SELECT COUNT(*) FROM `mt_cds_object` WHERE `parent_id`=1730 | 
| 71 | root      | localhost | NULL      | Query   |    0 | NULL         | show full processlist                                       | 
+----+-----------+-----------+-----------+---------+------+--------------+-------------------------------------------------------------+
2 rows in set (0.00 sec)
which I don't think helps either.

Can anyone give any pointers?

Thanks.

PS. I haven't done anything funky with mysql such as changing the root password or anything.
mad
Posts: 43
Joined: 11 Oct 2008, 14:48

Re: High mysqld cpu usage after reboot

Post by mad »

Have you tried stopping the mediatomb process?
Checked your slow question log?
RandomUsername
Posts: 904
Joined: 09 Oct 2009, 18:49

Re: High mysqld cpu usage after reboot

Post by RandomUsername »

mad wrote:Have you tried stopping the mediatomb process?
Thinking about it, no. I tried disabling mt-daapd because I know that uses mysql but, although it seems obvious, I didn't try disabling mediatomb. I don't use it so it doesn't ping on my radar. I'll reboot it again in a minute and try it.
Checked your slow question log?
Que?
RandomUsername
Posts: 904
Joined: 09 Oct 2009, 18:49

Re: High mysqld cpu usage after reboot

Post by RandomUsername »

Yep, it's definitely mediatomb causing it. I've disabled it because I don't use it anyway. However, that might change in the future so I wouldn't mind knowing how to stop this from happening. I'll try a few things like uninstalling/reinstalling and see what happens.
RandomUsername
Posts: 904
Joined: 09 Oct 2009, 18:49

Re: High mysqld cpu usage after reboot

Post by RandomUsername »

OK, this is weird. There is no doubt I had Mediatomb installed yet:

Code: Select all

server:/etc/mediatomb# aptitude purge mediatomb
Reading package lists... Done
Building dependency tree... Done
Reading extended state information       
Initializing package states... Done
Writing extended state information... Done
Reading task descriptions... Done         
Building tag database... Done    
No packages will be installed, upgraded, or removed.
0 packages upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Need to get 0B of archives. After unpacking 0B will be used.
Writing extended state information... Done
How does that work? So then I do:

Code: Select all

server:/etc/mediatomb# aptitude install mediatomb
Reading package lists... Done
Building dependency tree... Done
Reading extended state information      
Initializing package states... Done
Reading task descriptions... Done  
Building tag database... Done    
The following NEW packages will be automatically installed:
  lynx 
The following NEW packages will be installed:
  lynx mediatomb 
0 packages upgraded, 2 newly installed, 0 to remove and 0 not upgraded.
Need to get 1900kB of archives. After unpacking 4846kB will be used.
Do you want to continue? [Y/n/?] y
However, starting mediatomb still causes mad cpu usage by mysqld. Something's definitely up here though.
mad
Posts: 43
Joined: 11 Oct 2008, 14:48

Re: High mysqld cpu usage after reboot

Post by mad »

My guess is that mediatomb is refreshing its database on startup, maybe you just need to let mediatomb finish whatever it is doing.
RandomUsername
Posts: 904
Joined: 09 Oct 2009, 18:49

Re: High mysqld cpu usage after reboot

Post by RandomUsername »

You'd think so, but it's running for hours if I let it which can't be right.
Xet
Posts: 53
Joined: 12 May 2008, 02:40

Re: High mysqld cpu usage after reboot

Post by Xet »

Depending on how many files you got, it might actually be right.
If I remember correctly, the last time Mediatomb updated my database it took more than 24 hours.
RandomUsername
Posts: 904
Joined: 09 Oct 2009, 18:49

Re: High mysqld cpu usage after reboot

Post by RandomUsername »

Xet wrote:Depending on how many files you got, it might actually be right.
If I remember correctly, the last time Mediatomb updated my database it took more than 24 hours.
I've got nearly 24000 audio files, 11000 photos and a couple of hundred videos so I suppose it would take a long time to index all of those. Does mediatomb actually look at the contents of files (ie to generate thumbnails etc) as I can see it taking a long time if that were the case.
Post Reply