<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=us-ascii">
<META NAME="Generator" CONTENT="MS Exchange Server version 6.0.6603.0">
<TITLE>custom_zodb.py and Control_Panel</TITLE>
</HEAD>
<BODY>
<!-- Converted from text/rtf format -->

<P><FONT SIZE=2 FACE="Arial">v2.7.4 running on Linux - I'm trying to use this (custom_zodb.py in INSTANCE_HOME)</FONT>
</P>

<P><FONT SIZE=2 FACE="Arial">---------------------------------------------------------</FONT>

<BR><FONT SIZE=2 FACE="Arial">import os</FONT>

<BR><FONT SIZE=2 FACE="Arial">import ZODB.FileStorage</FONT>

<BR><FONT SIZE=2 FACE="Arial">import ZODB.DB</FONT>
</P>

<P><FONT SIZE=2 FACE="Arial">filename = os.path.join(INSTANCE_HOME, 'var', 'Data.fs')</FONT>

<BR><FONT SIZE=2 FACE="Arial">Storage = ZODB.FileStorage.FileStorage(filename)</FONT>

<BR><FONT SIZE=2 FACE="Arial">DB = ZODB.DB(Storage, pool_size=10)</FONT>

<BR><FONT SIZE=2 FACE="Arial">-----------------------------------------------------------</FONT>
</P>

<P><FONT SIZE=2 FACE="Arial">When I do it, zope does start up and run, but I get IOError every time I try to look at the &quot;main&quot; storage in Control_Panel-&gt;Database: </FONT></P>

<P><FONT SIZE=2 FACE="Arial">Traceback (most recent call last):</FONT>

<BR><FONT SIZE=2 FACE="Arial">&nbsp; File &quot;&lt;string&gt;&quot;, line 1, in ?</FONT>

<BR><FONT SIZE=2 FACE="Arial">&nbsp; File &quot;/home/zope/Zope-2.7.4-0/lib/python/Zope/__init__.py&quot;, line 51, in app</FONT>

<BR><FONT SIZE=2 FACE="Arial">&nbsp;&nbsp;&nbsp; startup()</FONT>

<BR><FONT SIZE=2 FACE="Arial">&nbsp; File &quot;/home/zope/Zope-2.7.4-0/lib/python/Zope/__init__.py&quot;, line 47, in startu</FONT>

<BR><FONT SIZE=2 FACE="Arial">p</FONT>

<BR><FONT SIZE=2 FACE="Arial">&nbsp;&nbsp;&nbsp; _startup()</FONT>

<BR><FONT SIZE=2 FACE="Arial">&nbsp; File &quot;/home/zope/Zope-2.7.4-0/lib/python/Zope/App/startup.py&quot;, line 57, in sta</FONT>

<BR><FONT SIZE=2 FACE="Arial">rtup</FONT>

<BR><FONT SIZE=2 FACE="Arial">&nbsp;&nbsp;&nbsp; DB = configuration.dbtab.getDatabase('/', is_root=1)</FONT>

<BR><FONT SIZE=2 FACE="Arial">&nbsp; File &quot;/home/zope/Zope-2.7.4-0/lib/python/DBTab/DBTab.py&quot;, line 96, in getDatab</FONT>

<BR><FONT SIZE=2 FACE="Arial">ase</FONT>

<BR><FONT SIZE=2 FACE="Arial">&nbsp;&nbsp;&nbsp; db = self._createDatabase(name, is_root)</FONT>

<BR><FONT SIZE=2 FACE="Arial">&nbsp; File &quot;/home/zope/Zope-2.7.4-0/lib/python/DBTab/DBTab.py&quot;, line 113, in _create</FONT>

<BR><FONT SIZE=2 FACE="Arial">Database</FONT>

<BR><FONT SIZE=2 FACE="Arial">&nbsp;&nbsp;&nbsp; db = factory.open()</FONT>

<BR><FONT SIZE=2 FACE="Arial">&nbsp; File &quot;/home/zope/Zope-2.7.4-0/lib/python/Zope/Startup/datatypes.py&quot;, line 172,</FONT>

<BR><FONT SIZE=2 FACE="Arial">&nbsp;in open</FONT>

<BR><FONT SIZE=2 FACE="Arial">&nbsp;&nbsp;&nbsp; DB = self.createDB()</FONT>

<BR><FONT SIZE=2 FACE="Arial">&nbsp; File &quot;/home/zope/Zope-2.7.4-0/lib/python/Zope/Startup/datatypes.py&quot;, line 169,</FONT>

<BR><FONT SIZE=2 FACE="Arial">&nbsp;in createDB</FONT>

<BR><FONT SIZE=2 FACE="Arial">&nbsp;&nbsp;&nbsp; return ZODBDatabase.open(self)</FONT>

<BR><FONT SIZE=2 FACE="Arial">&nbsp; File &quot;/home/zope/Zope-2.7.4-0/lib/python/ZODB/config.py&quot;, line 97, in open</FONT>

<BR><FONT SIZE=2 FACE="Arial">&nbsp;&nbsp;&nbsp; return ZODB.DB(section.storage.open(),</FONT>

<BR><FONT SIZE=2 FACE="Arial">&nbsp; File &quot;/home/zope/Zope-2.7.4-0/lib/python/ZODB/config.py&quot;, line 128, in open</FONT>

<BR><FONT SIZE=2 FACE="Arial">&nbsp;&nbsp;&nbsp; quota=self.config.quota)</FONT>

<BR><FONT SIZE=2 FACE="Arial">&nbsp; File &quot;/home/zope/Zope-2.7.4-0/lib/python/ZODB/FileStorage.py&quot;, line 232, in __</FONT>

<BR><FONT SIZE=2 FACE="Arial">init__</FONT>

<BR><FONT SIZE=2 FACE="Arial">&nbsp;&nbsp;&nbsp; self._lock_file = LockFile(file_name + '.lock')</FONT>

<BR><FONT SIZE=2 FACE="Arial">&nbsp; File &quot;/home/zope/Zope-2.7.4-0/lib/python/ZODB/lock_file.py&quot;, line 62, in __ini</FONT>

<BR><FONT SIZE=2 FACE="Arial">t__</FONT>

<BR><FONT SIZE=2 FACE="Arial">&nbsp;&nbsp;&nbsp; lock_file(self._fp)</FONT>

<BR><FONT SIZE=2 FACE="Arial">&nbsp; File &quot;/home/zope/Zope-2.7.4-0/lib/python/ZODB/lock_file.py&quot;, line 42, in lock_</FONT>

<BR><FONT SIZE=2 FACE="Arial">file</FONT>

<BR><FONT SIZE=2 FACE="Arial">&nbsp;&nbsp;&nbsp; fcntl.flock(file.fileno(), _flags)</FONT>

<BR><FONT SIZE=2 FACE="Arial">IOError: [Errno 11] Resource temporarily unavailable</FONT>
</P>
<BR>

<P><FONT SIZE=2 FACE="Arial">If I remove the custom_zodb.py file, the problem goes away.&nbsp; Why is the file locked to the ZMI when I use custom_zodb.py?</FONT></P>
<BR>
<BR>
<BR>
<BR>
<BR>

</BODY>
</HTML>