Greyhole sqlite loop

robnix
Posts: 12
Joined: Wed Nov 04, 2009 3:39 pm

Greyhole sqlite loop

Postby robnix » Tue May 18, 2010 8:43 pm

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?

User avatar
cpg
Administrator
Posts: 2618
Joined: Wed Dec 03, 2008 7:40 am
Contact:

Re: Greyhole sqlite loop

Postby cpg » Wed May 19, 2010 10:25 am

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.
My HDA: Intel(R) Core(TM) i5-3570K CPU @ 3.40GHz on MSI board, 8GB RAM, 1TBx2+3TBx1

User avatar
gboudreau
Posts: 606
Joined: Sat Jan 23, 2010 1:15 pm
Location: Montréal, Canada
Contact:

Re: Greyhole sqlite loop

Postby gboudreau » Wed May 19, 2010 10:55 am

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.
- Guillaume Boudreau

robnix
Posts: 12
Joined: Wed Nov 04, 2009 3:39 pm

Re: Greyhole sqlite loop

Postby robnix » Thu Jul 15, 2010 9:39 am

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.

Who is online

Users browsing this forum: No registered users and 32 guests