Page 1 of 1

Greyhole sqlite loop

Posted: Tue May 18, 2010 8:43 pm
by robnix
Stuck in a loop.

Code: Select all

[/sqlite3 /var/cache/greyhole.sqlite 'select count(*) from tasks'; sleep 60; sqlite3 /var/cache/greyhole.sqlite 'select count(*) from tasks' 1058194 1058286
Have to shut server down now.


Any ideas?

Re: Greyhole sqlite loop

Posted: Wed May 19, 2010 10:25 am
by cpg
can you say more about how this came about?

like, was it the first time GH was turned on?

was anything done at the moment or shortly before, to "trigger" this condition?

we know the first time it can generate long queues of files to operate on.

definitely interested in debugging this. Also, note that sleep 60; there ... it does not look like a tight loop, so i am puzzled why you would need to shut down the server.

Re: Greyhole sqlite loop

Posted: Wed May 19, 2010 10:55 am
by gboudreau
I'm curious on how Greyhole can accumulate that much backlog. Unless it's fake / duplicate entries...
And I don't see how can duplicate entries could be inserted...
Did you make that much (1,000,000+) file operations (file creates, updates, deletes) on your shares, since you enabled 'Uses pool' on them?

I'd like to get the following:

Code: Select all

# Choose a work dir with enough free space... WORKDIR=~/greyhole_debug mkdir -p ${WORKDIR} cp /var/cache/greyhole.sqlite ${WORKDIR}/ grep -i greyhole /var/log/messages* > ${WORKDIR}/var_log_messages cp /var/log/greyhole.log* ${WORKDIR}/ cp /var/log/monit* ${WORKDIR}/ cd ${WORKDIR}/.. tar -zcf greyhole_debug.tar.gz ${WORKDIR}
Send me the resulting greyhole_debug.tar.gz file here:
http://pub.pommepause.com

If you need more detailed instructions, feel free to ask.
You can also reach me in the IRC channel; my alias is Mouton.

We have an updated greyhole RPM (version 0.6.8) that will prevent such big databases by forcing the greyhole daemon to stop parsing the /var/log/messages file after 10k rows, and will allow it to work on those operations for a while before continuing to parse the log file.
This should prevent such situations from happening in the future.
But before I ask you to upgrade, I'd like to see how this happened, and also how best to get you back on track.

Thanks.

Re: Greyhole sqlite loop

Posted: Thu Jul 15, 2010 9:39 am
by robnix
Sorry about not responding. I got a bit frustrated and took the server down. Thanks for the MYSql guide though, I'm going to check it out again this weekend.