mysqld process cpu usage

Asked by Pascal

Hello,
i notice another problem with xibo :
each time xibo start, or each time i make some changes, the mysqld process use 100% of cpu and in the mysql.log i've got those lines :
(i cut the file because therre is a lot of lines.)

there is nothing in mysql/mysql-slow.log

also there is lot of error messages in the log table.

090707 8:44:01 3656 Query INSERT INTO stat (statDate, scheduleID, displayID, layoutID, mediaID, start, end) VALUES ('2009-07-06 10:26:28', '0', '2', '11', 'cb5e322eba8e34019c39c48a5db301d2', '2009-07-06 10:26:28', '2050-12-31 00:00:00')
                   3656 Query UPDATE stat SET end = '2009-07-06 10:26:33' WHERE scheduleID = '0' AND layoutID = '11' AND mediaID = '92bc717571b62e72453465862e7ed159' AND end = '2050-12-31 00:00:00'
                   3681 Query INSERT INTO stat (statDate, scheduleID, displayID, layoutID, mediaID, start, end) VALUES ('2009-07-06 10:16:13', '0', '2', '11', '0a2fc9c4e01759b93c13b2d170fd6c0f', '2009-07-06 10:16:13', '2050-12-31 00:00:00')
090707 8:44:02 3681 Query UPDATE stat SET end = '2009-07-06 10:16:19' WHERE scheduleID = '0' AND layoutID = '11' AND mediaID = '0e5ff1c61b9ae429216082b3c420d9ef' AND end = '2050-12-31 00:00:00'
                   3633 Query INSERT INTO stat (statDate, scheduleID, displayID, layoutID, mediaID, start, end) VALUES ('2009-07-06 13:30:16', '0', '2', '11', 'cb5e322eba8e34019c39c48a5db301d2', '2009-07-06 13:30:16', '2050-12-31 00:00:00')
                   3633 Query UPDATE stat SET end = '2009-07-06 13:30:22' WHERE scheduleID = '0' AND layoutID = '11' AND mediaID = '92bc717571b62e72453465862e7ed159' AND end = '2050-12-31 00:00:00'
090707 8:44:03 3659 Query INSERT INTO stat (statDate, scheduleID, displayID, layoutID, mediaID, start, end) VALUES ('2009-07-06 10:24:33', '0', '2', '11', '797f0e6ee0b6ae420b951cda42b5b8ac', '2009-07-06 10:24:33', '2050-12-31 00:00:00')
                   3659 Query UPDATE stat SET end = '2009-07-06 10:24:38' WHERE scheduleID = '0' AND layoutID = '11' AND mediaID = '39246bc14fc2e7c83ab8ee85b03f0a60' AND end = '2050-12-31 00:00:00'
                   3636 Query INSERT INTO stat (statDate, scheduleID, displayID, layoutID, mediaID, start, end) VALUES ('2009-07-06 13:20:16', '0', '2', '11', 'baf4a0885ef19a077bf45dadbbe3ba95', '2009-07-06 13:20:16', '2050-12-31 00:00:00')
                   3636 Query UPDATE stat SET end = '2009-07-06 13:20:22' WHERE scheduleID = '0' AND layoutID = '11' AND mediaID = 'cb5e322eba8e34019c39c48a5db301d2' AND end = '2050-12-31 00:00:00'
090707 8:44:04 3672 Query INSERT INTO stat (statDate, scheduleID, displayID, layoutID, mediaID, start, end) VALUES ('2009-07-06 10:17:33', '0', '2', '11', 'fddbae5a747b48b81d05a21d4b52e7d1', '2009-07-06 10:17:33', '2050-12-31 00:00:00')
                   3672 Query UPDATE stat SET end = '2009-07-06 10:17:38' WHERE scheduleID = '0' AND layoutID = '11' AND mediaID = 'b9852217df3a4382e06af36f9aebc330' AND end = '2050-12-31 00:00:00'
                   3656 Query INSERT INTO stat (statDate, scheduleID, displayID, layoutID, mediaID, start, end) VALUES ('2009-07-06 10:26:33', '0', '2', '11', '92bc717571b62e72453465862e7ed159', '2009-07-06 10:26:33', '2050-12-31 00:00:00')
                   3656 Query UPDATE stat SET end = '2009-07-06 10:26:39' WHERE scheduleID = '0' AND layoutID = '11' AND mediaID = '797f0e6ee0b6ae420b951cda42b5b8ac' AND end = '2050-12-31 00:00:00'
090707 8:44:05 3681 Query INSERT INTO stat (statDate, scheduleID, displayID, layoutID, mediaID, start, end) VALUES ('2009-07-06 10:16:19', '0', '2', '11', '0e5ff1c61b9ae429216082b3c420d9ef', '2009-07-06 10:16:19', '2050-12-31 00:00:00')
                   3681 Query UPDATE stat SET end = '2009-07-06 10:16:24' WHERE scheduleID = '0' AND layoutID = '11' AND mediaID = '853aaa019a8780bfefa8e323c89b5e40' AND end = '2050-12-31 00:00:00'
                   3633 Query INSERT INTO stat (statDate, scheduleID, displayID, layoutID, mediaID, start, end) VALUES ('2009-07-06 13:30:22', '0', '2', '11', '92bc717571b62e72453465862e7ed159', '2009-07-06 13:30:22', '2050-12-31 00:00:00')
                   3633 Query UPDATE stat SET end = '2009-07-06 13:30:27' WHERE scheduleID = '0' AND layoutID = '11' AND mediaID = '797f0e6ee0b6ae420b951cda42b5b8ac' AND end = '2050-12-31 00:00:00'
090707 8:44:06 3659 Query INSERT INTO stat (statDate, scheduleID, displayID, layoutID, mediaID, start, end) VALUES ('2009-07-06 10:24:38', '0', '2', '11', '39246bc14fc2e7c83ab8ee85b03f0a60', '2009-07-06 10:24:38', '2050-12-31 00:00:00')
                   3659 Query UPDATE stat SET end = '2009-07-06 10:24:45' WHERE scheduleID = '0' AND layoutID = '11' AND mediaID = '805ed5e6a7d4bbb8bc438756ef125512' AND end = '2050-12-31 00:00:00'
                   3636 Query INSERT INTO stat (statDate, scheduleID, displayID, layoutID, mediaID, start, end) VALUES ('2009-07-06 13:20:22', '0', '2', '11', 'cb5e322eba8e34019c39c48a5db301d2', '2009-07-06 13:20:22', '2050-12-31 00:00:00')
                   3636 Query UPDATE stat SET end = '2009-07-06 13:20:27' WHERE scheduleID = '0' AND layoutID = '11' AND mediaID = '92bc717571b62e72453465862e7ed159' AND end = '2050-12-31 00:00:00'
090707 8:44:07 3672 Query INSERT INTO stat (statDate, scheduleID, displayID, layoutID, mediaID, start, end) VALUES ('2009-07-06 10:17:38', '0', '2', '11', 'b9852217df3a4382e06af36f9aebc330', '2009-07-06 10:17:38', '2050-12-31 00:00:00')
                   3672 Query UPDATE stat SET end = '2009-07-06 10:17:44' WHERE scheduleID = '0' AND layoutID = '11' AND mediaID = '1' AND end = '2050-12-31 00:00:00'
090707 8:44:08 3656 Query INSERT INTO stat (statDate, scheduleID, displayID, layoutID, mediaID, start, end) VALUES ('2009-07-06 10:26:39', '0', '2', '11', '797f0e6ee0b6ae420b951cda42b5b8ac', '2009-07-06 10:26:39', '2050-12-31 00:00:00')
                   3656 Query UPDATE stat SET end = '2009-07-06 10:26:44' WHERE schedul

thanks

Question information

Language:
English Edit question
Status:
Answered
For:
Xibo Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Alex Harrington (alexharrington) said :
#1

Hi Pascal

I ran in to this problem yesterday as it happens. On one of your clients, a backlog of statistics has built up - possibly due to an error (we're still looking at that) - which is causing the client to repeatedly log stats back to the webservice.

On each client, look in C:\Documents and Settings\user\Application Data\Xibo\Xibo Digital Signage\2.0.0.0

One of them will probably have a whole load of .ready files. Stop that client running and delete all the files in that directory (including any .xml files).

It would be interesting to get the full output from your SQL logging and the errors you mention in the log. Please could you save those out as text files, compress them and then email to <email address hidden>?

Many thanks

Alex

Revision history for this message
Pascal (pascal-legrand) said :
#2

-------- Message original --------

> Your question #76281 on Xibo changed:
> https://answers.launchpad.net/xibo/+question/76281
>
> Status: Open => Answered
>
> Alex Harrington proposed the following answer:
> Hi Pascal
>
> I ran in to this problem yesterday as it happens. On one of your
> clients, a backlog of statistics has built up - possibly due to an error
> (we're still looking at that) - which is causing the client to
> repeatedly log stats back to the webservice.
>
> On each client, look in C:\Documents and Settings\user\Application
> Data\Xibo\Xibo Digital Signage\2.0.0.0
>
> One of them will probably have a whole load of .ready files. Stop that
> client running and delete all the files in that directory (including any
> .xml files).
done

>
> It would be interesting to get the full output from your SQL logging and
> the errors you mention in the log. Please could you save those out as
> text files, compress them and then email to <email address hidden>?
>
> Many thanks
>
> Alex
>
you want the /var/log/mysql/mysql.log files and the log table ?

thanks

--

---------------------------------------------------------------
Pascal Legrand
*IUT de Chartres* - _Service Informatique_
---------------------------------------------------------------
1, place Roger Joly
28000 Chartres
Tel : 02 37 91 83 36 - Fax: 02 37 91 83 01

Revision history for this message
Pascal (pascal-legrand) said :
#3

-------- Message original --------

> Your question #76281 on Xibo changed:
> https://answers.launchpad.net/xibo/+question/76281
>
> Status: Open => Answered
>
> Alex Harrington proposed the following answer:
> Hi Pascal
>
> I ran in to this problem yesterday as it happens. On one of your
> clients, a backlog of statistics has built up - possibly due to an error
> (we're still looking at that) - which is causing the client to
> repeatedly log stats back to the webservice.
>
> On each client, look in C:\Documents and Settings\user\Application
> Data\Xibo\Xibo Digital Signage\2.0.0.0
>
> One of them will probably have a whole load of .ready files. Stop that
> client running and delete all the files in that directory (including any
> .xml files).
done

>
> It would be interesting to get the full output from your SQL logging and
> the errors you mention in the log. Please could you save those out as
> text files, compress them and then email to <email address hidden>?
>
> Many thanks
>
> Alex
>
you want the /var/log/mysql/mysql.log files and the log table ?

thanks
ps the client is not running and mysqld use a lot of cpu

--

---------------------------------------------------------------
Pascal Legrand
*IUT de Chartres* - _Service Informatique_
---------------------------------------------------------------
1, place Roger Joly
28000 Chartres
Tel : 02 37 91 83 36 - Fax: 02 37 91 83 01

Revision history for this message
Alex Harrington (alexharrington) said :
#4

Yes - both please.

If the client isn't running now, I expect there's still an error causing this loop. Please stop Apache (by killing it if required) so that the MySQL loading goes back to nothing. You can then sort out the client causing the problem.

Cheers

Alex

Revision history for this message
Pascal (pascal-legrand) said :
#5

-------- Message original --------

> Your question #76281 on Xibo changed:
> https://answers.launchpad.net/xibo/+question/76281
>
> Status: Open => Answered
>
> Alex Harrington proposed the following answer:
> Yes - both please.
>
> If the client isn't running now, I expect there's still an error causing
> this loop. Please stop Apache (by killing it if required) so that the
> MySQL loading goes back to nothing. You can then sort out the client
> causing the problem.
>
> Cheers
>
> Alex
>
here is the log table and a piece of my mysql.log

however, the problem seems disapered since i restart apache ??

i've got only one client running

thanks

--

---------------------------------------------------------------
Pascal Legrand
*IUT de Chartres* - _Service Informatique_
---------------------------------------------------------------
1, place Roger Joly
28000 Chartres
Tel : 02 37 91 83 36 - Fax: 02 37 91 83 01

Revision history for this message
Alex Harrington (alexharrington) said :
#6

Hi Pascal

Launchpad doesn't support email attachments - please could you send your
email to <email address hidden>

Cheers

Alex

Revision history for this message
Pascal (pascal-legrand) said :
#7

hello,
in fact the problem is still present : the mysqld process still use 100% of cpu each time xibo start or if i made some changes

thanks

Revision history for this message
Alex Harrington (alexharrington) said :
#8

Hi Pascal

From my previous reply:

> On each client, look in C:\Documents and Settings\user\Application Data\Xibo\Xibo Digital Signage\2.0.0.0
>
>One of them will probably have a whole load of .ready files. Stop that client running and delete all the files in that directory (including any .xml files).

Please can you check for those again and let me know if you find any (and if so how many).

Cheers

Alex

Revision history for this message
Pascal (pascal-legrand) said :
#9

-------- Message original --------

> Your question #76281 on Xibo changed:
> https://answers.launchpad.net/xibo/+question/76281
>
> Status: Open => Answered
>
> Alex Harrington proposed the following answer:
> Hi Pascal
>
>>From my previous reply:
>
>> On each client, look in C:\Documents and Settings\user\Application Data\Xibo\Xibo Digital Signage\2.0.0.0
>>
>>One of them will probably have a whole load of .ready files. Stop that client running and delete all the files in that directory (including any .xml files).
>
> Please can you check for those again and let me know if you find any
> (and if so how many).
>
> Cheers
>
> Alex
>
there is only one file : 128919385092343750.ready

thanks

--

---------------------------------------------------------------
Pascal Legrand
*IUT de Chartres* - _Service Informatique_
---------------------------------------------------------------
1, place Roger Joly
28000 Chartres
Tel : 02 37 91 83 36 - Fax: 02 37 91 83 01

Revision history for this message
Alex Harrington (alexharrington) said :
#10

OK - so can you rename it to something other than .ready (eg .ready.old), delete all the other files, restart Apache and then start the client back up please.

Alex

Revision history for this message
Pascal (pascal-legrand) said :
#11

-------- Message original --------

> Your question #76281 on Xibo changed:
> https://answers.launchpad.net/xibo/+question/76281
>
> Status: Open => Answered
>
> Alex Harrington proposed the following answer:
> OK - so can you rename it to something other than .ready (eg
> .ready.old), delete all the other files, restart Apache and then start
> the client back up please.
>
> Alex
>
i already done that last time, it worked and after the problem come back
any way i do it

i stop the client
rename 128919385092343750.ready => 128919385092343750.ready.old
rename 128919436651093750.ready => 128919436651093750.ready.old
delete log.xml, schedule.xml
restart apache
restart the client

thanks

--

---------------------------------------------------------------
Pascal Legrand
*IUT de Chartres* - _Service Informatique_
---------------------------------------------------------------
1, place Roger Joly
28000 Chartres
Tel : 02 37 91 83 36 - Fax: 02 37 91 83 01

Revision history for this message
Alex Harrington (alexharrington) said :
#12

Hi Pascal

I'm not clear. Doing that has solved it again for now, or is it still doing it?

We haven't made any change yet to prevent that from happening - as we're still trying to fully understand what causes it (and in such a small number of cases - as far as I'm aware the only people to see this are you and me - and I've not had any recurrance).

Could you email over those renamed .ready files so we can see what's in them.

Cheers

Alex

Revision history for this message
Pascal (pascal-legrand) said :
#13

-------- Message original --------

> Your question #76281 on Xibo changed:
> https://answers.launchpad.net/xibo/+question/76281
>
> Status: Open => Answered
>
> Alex Harrington proposed the following answer:
> Hi Pascal
>
> I'm not clear. Doing that has solved it again for now, or is it still
> doing it?
no problem, you are clear, it's only my poor english wich is the problem
it solve the problem only for a moment, some time after the problem come back
>
> We haven't made any change yet to prevent that from happening - as we're
> still trying to fully understand what causes it (and in such a small
> number of cases - as far as I'm aware the only people to see this are
> you and me - and I've not had any recurrance).
>
> Could you email over those renamed .ready files so we can see what's in
> them.

>
> Cheers
>
> Alex
thanks for your help
>

--

---------------------------------------------------------------
Pascal Legrand
*IUT de Chartres* - _Service Informatique_
---------------------------------------------------------------
1, place Roger Joly
28000 Chartres
Tel : 02 37 91 83 36 - Fax: 02 37 91 83 01

Revision history for this message
Alex Harrington (alexharrington) said :
#14

OK - thanks.

If you can email over those files to <email address hidden> we can put them in to a client here and see if we can reproduce it.

Cheers

Alex

Revision history for this message
Dan Garner (dangarner) said :
#15

Hi Pascal,

I didn't realise the .ready files were so large... .ready files should be no bigger than 6KB in size. It appears that there may be some reason the Xibo Client cannot create a ready file when it ought to.

Could you try disabling stats on that troublesome client? And then see if the problem reoccurs...

Do you have some media on any of your layouts that has a very low duration?

I will look into the code to see why the file is getting so large.

Cheers,
Dan

Revision history for this message
Dan Garner (dangarner) said :
#16

Hi Pascal,

I have found the problem and am now sure that turning stats off should resolve it for you.

If you still experience the problem with stats off please let me know...

Cheers,
Dan

Revision history for this message
Andy (athompson-mooreheadcomm) said :
#17

We just ran into this problem today while testing. The client install was on a windows 7 box, not sure if that makes a difference or not. Took my server down twice today though, haven't seen the problem since disabling stats on it.

Is there a fix for the problem or just disable stats for the time being? What kind of reporting is there currently on the stats that are gathered?

Revision history for this message
Dan Garner (dangarner) said :
#18

Hi Andy,

Interesting to know that it runs ok on a windows 7 box!

We seem to have isolated the problem to the stats message and are in discussion about how best to fix it. I think the solution will turn out to be a slight re-think in the way we collect and send the stats. For the time being the best thing you can do is disable the stats.

Currently the server interface does not expose stats in any way, nor does it provide a method of archiving the stats.

The long and the short of it is that currently you cannot see the stats in the released version and they do sometimes cause problems. The only reason we will keep them in 1.0.3 (adjusted so they are fixed) is that we know of some people that have built interfaces ontop of them.

Hope this helps...

Revision history for this message
Alex Harrington (alexharrington) said :
#19

Hi Andy

We're pretty sure we understand the problem now and there will be a fix in 1.0.3. We don't do anything with the stats collected at the moment - except log them.

At some point a reporting interface will be written, and assuming you've had stats on then there will be historical data in there to report on.

Cheers

Alex

--- original message ---
From: "Andy" <email address hidden>
Subject: Re: [Question #76281]: mysqld process cpu usage
Date: 20th July 2009
Time: 9:50:07 pm

Question #76281 on Xibo changed:
https://answers.launchpad.net/xibo/+question/76281

Andy requested for more information:
We just ran into this problem today while testing. The client install
was on a windows 7 box, not sure if that makes a difference or not.
Took my server down twice today though, haven't seen the problem since
disabling stats on it.

Is there a fix for the problem or just disable stats for the time being?
What kind of reporting is there currently on the stats that are
gathered?

--
You received this question notification because you are a member of Xibo
Developers, which is an answer contact for Xibo.

Revision history for this message
Andy (athompson-mooreheadcomm) said :
#20

Actually just had to come back in to the office, server was down again. I didn't delete the .ready file from the user folder though earlier, apparently the client will still try to process that even when stats are disabled?

Anyway, I've got the client up and running again but wanted to verify my oversight one way or the other. Stat table is happily unchanging right now so I imagine that was the problem.

Thanks for the info guys!

-andy

Revision history for this message
Dan Garner (dangarner) said :
#21

Andy,

Yes it will still process that file even if stats are disabled. Mainly because that file is also used for error logging - so last night the error logging would have triggered the send of that file.

Part of our proposed change is to separate the stats from the other logging and improve the situation where the client cannot send the log properly (causing your problem).

If it looks like 1.0.3 is going to take a while after this fix is available I will attach it to this thread so you can patch.

Cheers,
Dan

Can you help with this problem?

Provide an answer of your own, or ask Pascal for more information if necessary.

To post a message you must log in.