[Zope] Database hosed!?
Jim Fulton
jim@digicool.com
Mon, 26 Apr 1999 09:19:46 -0400
This is a multi-part message in MIME format.
--------------08385437788582AC206BD7C9
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Bill Anderson wrote:
>
> Hello, after restarting one of my Zope servers, it fails and I get the
> following:
>
> ...
> raise DatabaseError, (
> DatabaseError: The database contains records, starting at position
> 112192, that have time stamps 629676609.614 seconds in the future. This
> could lead to database corruption. Please double check your system
> clock!
Of course, you need to check your system clock.
Zope cares about time, so bad clocks can cause it problems.
There should probably be an (emergency) option
to make it ignore weird times.
> Now just how hte heck do I fix this one?
> (outside of modifying the code to ignore the date and hope I can fix it
> once it is up and running?)
I've attached a small script that will fix broken time-stamps in
a database file. This script (which is available through the public
CVS) will be in 1.11.
Jim
--
Jim Fulton mailto:jim@digicool.com Python Powered!
Technical Director (888) 344-4332 http://www.python.org
Digital Creations http://www.digicool.com http://www.zope.org
Under US Code Title 47, Sec.227(b)(1)(C), Sec.227(a)(2)(B) This email
address may not be added to any commercial mail list with out my
permission. Violation of my privacy with advertising or SPAM will
result in a suit for a MINIMUM of $500 damages/incident, $1500 for
repeats.
--------------08385437788582AC206BD7C9
Content-Type: application/x-unknown-content-type-Python.File;
name="fixbbbts.py"
Content-Transfer-Encoding: base64
Content-Disposition: inline;
filename="fixbbbts.py"
aW1wb3J0IHN5cwoKX19kb2NfXz0iIiJGaXggQm9ib1BPUyB0aW1lIHN0YW1wcwoKSWYgYSBz
eXN0ZW0gaGFzIGEgcHJvYmxlbSB3aXRoIGl0J3MgY2xvY2sgc2V0dGluZywgaXQgbWF5IGNh
dXNlCmRhdGFiYXNlIHJlY29yZHMgdG8gYmUgd3JpdHRlbiB3aXRoIHRpbWUgc3RhbXBzIGlu
IHRoZSBmdXR1cmUuICBUaGlzCmNhdXNlcyBwcm9ibGVtcyB3aGVuIHRoZSBjbG9jayBpcyBm
aXhlZCBvciB3aGVuIHRoZSBkYXRhIGFyZSBtb3Z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ICBzdGFydD1Ob25lCiAgICAgICAg
aWYgcGxlbiA+IHRsZW4gb3IgdGxlbiA8IDI4OiByYWlzZSBDb3JydXB0ZWQsIHBvcwogICAg
ICAgIAogICAgICAgIHdyaXRlKHBhY2soIj5paWRpaSIsIG9pZCwgcHJldiwgdCwgdGxlbiwg
cGxlbikpCiAgICAgICAgbD10bGVuLTI4CiAgICAgICAgcz04MTk2CiAgICAgICAgd2hpbGUg
bCA+IDA6CiAgICAgICAgICAgIGlmIHMgPiBsOiBzPWwKICAgICAgICAgICAgZD1yZWFkKHMp
CiAgICAgICAgICAgIGlmIG5vdCBkOiByYWlzZSBDb3JydXB0ZWQsIHBvcwogICAgICAgICAg
ICB3cml0ZShkKQogICAgICAgICAgICBsPWwtbGVuKGQpCiAgICAgICAgZD1yZWFkKDQpCiAg
ICAgICAgaWYgZCAhPSBoWzE2OjIwXTogcmFpc2UgQ29ycnVwdGVkLCBwb3MKICAgICAgICB3
cml0ZShkKQogICAgICAgIHBvcz1wb3MrdGxlbgoKaWYgX19uYW1lX189PSdfX21haW5fXyc6
IG1haW4oKQogICAgICAgICAgICAK
--------------08385437788582AC206BD7C9--