Re: How to get out of snapshot mode?

Ed Leafe <[email protected]> Mon, 20 Mar 2006 12:02:59 -0500
Newsgroups gmane.comp.web.zope.zodb.dirstorage
Message-ID <[email protected]>
On Mar 20, 2006, at 11:29 AM, Toby Dickenson wrote:

>> Snapshot mode
>> The storage is currently in snapshot mode recombining/startup.
>
> OK, so you already have restarted the storage server.  
> DirectoryStorage has
> started recombining changes made during that previous snapshot  
> mode, and wont
> let another snapshot mode start until that process is complete.

	FWIW, I had started the server yesterday afternoon. This morning I  
got an error message for the backup process, which is what initiated  
my email to you. Shouldn't it have finished recombining after more  
than 12 hours?

> Why did it not complete? Maybe there is some clue in the error log.  
> Maybe try
> restarting the storage server again. (or, maybe it is just taking a  
> while. Is
> there lots of IO on this machine right now?)

	No, not very much at all (my site is relatively low traffic). I just  
restarted Zope again; here's the event log from the restart point:

------
2006-03-20T11:46:28 INFO ZServer HTTP server started at Mon Mar 20  
11:46:28 2006
     Hostname: 0.0.0.0
     Port: xxxx
------
2006-03-20T11:46:28 INFO ZServer FTP server started at Mon Mar 20  
11:46:28 2006
     Hostname:
     Port: xxxx
------
2006-03-20T11:46:35 INFO ZServer WebDAV server started at Mon Mar 20  
11:46:35 2006
     Hostname: 0.0.0.0
     Port: xxxx
------
2006-03-20T11:46:40 INFO DirectoryStorage Flushing 35 transactions  
(recovery)
------
2006-03-20T11:46:43 INFO ZODB.Mount Opening database for mounting:  
'142113784_1019839414.213646'
------
2006-03-20T11:46:43 INFO ZODB.Mount Mounted database  
'142113784_1019839414.213646' at /temp_folder
------
2006-03-20T11:46:47 INFO Zope Ready to handle requests

	After that, I get an occasional error message like this:

2006-03-20T11:49:42 INFO ZPublisher.Conflict ConflictError at / 
VirtualHostBase/http/leafe.com:80/archives/showFullThd: database  
conflict error (oid 0x0c, class BTrees._OOBTree.OOBTree, serial this  
txn started with 0x036438901e6d6055 2006-03-20 16:48:07.131387,  
serial currently committed 0x036438919f5bccaa 2006-03-20  
16:49:37.349670) (1 conflicts (0 unresolved) since startup at Mon Mar  
20 11:48:09 2006)


>> 	How would I be able to tell if this is the case? And if so, what
>> 	steps would I take?
>
> lsof, then kill it.
>
> However Im now sure thats not the case.

	You're correct. Running that shows that the current Zope process has  
the files open, and killing Zope releases the lock.

> On startup DirectoryStorage has
> decided to start recombining. If something had still locked misc/ 
> sublock then
> DirectoryStorage would not have been able to start recombining. (in  
> this case
> there would be an entry in the error log saying 'Engaging in  
> snapshot mode')

	I restarted Zope with the event log set to 'all'. Now I see lots of  
'commits' for the same transaction; here's a sample:

2006-03-20T11:59:47 INFO Zope Ready to handle requests
------
2006-03-20T11:59:54 DEBUG txn.111926192 new transaction
------
2006-03-20T11:59:55 DEBUG txn.111926192 commit <Connection at b6e5834c>
------
2006-03-20T11:59:55 DEBUG txn.111926192 commit
------
2006-03-20T12:00:00 DEBUG txn.111926192 new transaction
------
2006-03-20T12:00:04 DEBUG txn.111926192 commit <Connection at b6e5834c>
------
2006-03-20T12:00:04 DEBUG txn.111926192 commit
------
2006-03-20T12:00:05 DEBUG txn.111926192 new transaction
------
2006-03-20T12:00:10 DEBUG txn.111926192 commit <Connection at b6e5834c>
------
2006-03-20T12:00:10 DEBUG txn.111926192 commit
------
2006-03-20T12:00:23 DEBUG txn.111926192 new transaction
------
2006-03-20T12:00:24 DEBUG txn.111926192 commit

	Dunno if this is of any help in figuring out what's 'stuck'.


-- Ed Leafe
-- http://leafe.com
-- http://dabodev.com





-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642