<meta http-equiv="Content-Type" content="text/html; charset=utf-8"><meta name="ProgId" content="Word.Document"><meta name="Generator" content="Microsoft Word 9"><meta name="Originator" content="Microsoft Word 9"><link rel="File-List" href="file:///C:/DOCUME%7E1/ADMINI%7E1/LOCALS%7E1/Temp/msoclip1/01/clip_filelist.xml"><style>
<!--
 /* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {mso-style-parent:"";
        margin:0in;
        margin-bottom:.0001pt;
        mso-pagination:widow-orphan;
        font-size:12.0pt;
        font-family:"Times New Roman";
        mso-fareast-font-family:"Times New Roman";}
@page Section1
        {size:8.5in 11.0in;
        margin:1.0in 1.25in 1.0in 1.25in;
        mso-header-margin:.5in;
        mso-footer-margin:.5in;
        mso-paper-source:0;}
div.Section1
        {page:Section1;}
-->
</style>

<p class="MsoNormal">Hi Sebastian,</p>

<p class="MsoNormal"> </p>

<p class="MsoNormal">Why don’t you consider to use memcached for caching the
results instead of using sessions? By using this, Zeo server/Zeo clients
restart wont affect cached data.</p>

<p class="MsoNormal"> </p>

<p class="MsoNormal">HTH,</p>

<span style="font-size: 12pt; font-family: &quot;Times New Roman&quot;;">Dragos</span><br><br><br><div class="gmail_quote">On Sun, Jul 11, 2010 at 8:41 AM, Sebastian Tiedtke <span dir="ltr">&lt;<a href="mailto:st@mdvtts.com">st@mdvtts.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">Hi all,<div><br></div><div>We&#39;re working on a large scale Plone deployment and recently came across some odd behavior with tempstorage at our ZEO server. A limited number, yet highly frequented, of pages on our Plone site query backend web services that provide location based services such as geocoding and routing (a to b). Since those calls to the services are rather computation intense we decided to store intermediate and resulting data in sessions vs. re-querying the service for no reason.</div>


<div><br></div><div>The system setup consists of a central ZEO server that provides the storage for content as well as a temp storage for sessioning. There are multiple other servers that run multiple Plone instances with ZEO clients. The ZEO server setup is straight forward but I&#39;m happy to provide the configuration files. Generally the concept works great.</div>


<div><br></div><div>However, whenever we restart the ZEO server and keep the client instances running we get odd behavior with the client instances&#39; sessioning. Every client appears to reconnect and, if required, revalidates its cache.</div>


<div><br></div><div><div><span style="font-family: &#39;courier new&#39;,monospace;">2010-07-11T14:46:03 INFO ZEO.ClientStorage (6132) Disconnected from storage: &quot;(&#39;<a href="http://ITIS.mentzdv.de" target="_blank">ITIS.mentzdv.de</a>&#39;, 8100)&quot;</span></div>


<div><span style="font-family: &#39;courier new&#39;,monospace;">2010-07-11T14:46:03 INFO ZEO.ClientStorage (6132) Disconnected from storage: &quot;(&#39;<a href="http://ITIS.mentzdv.de" target="_blank">ITIS.mentzdv.de</a>&#39;, 8100)&quot;</span></div>


<div><span style="font-family: &#39;courier new&#39;,monospace;">2010-07-11T14:46:09 INFO ZEO.ClientStorage (6132) Testing connection &lt;ManagedClientConnection (&#39;127.0.0.1&#39;, 8100)&gt;</span></div>

<div><span style="font-family: &#39;courier new&#39;,monospace;">2010-07-11T14:46:09 INFO ZEO.zrpc.Connection(C) (<a href="http://127.0.0.1:8100" target="_blank">127.0.0.1:8100</a>) received handshake &#39;Z303&#39;</span></div>


<div><span style="font-family: &#39;courier new&#39;,monospace;">2010-07-11T14:46:09 INFO ZEO.ClientStorage (6132) Server authentication protocol None</span></div><div><span style="font-family: &#39;courier new&#39;,monospace;">2010-07-11T14:46:09 INFO ZEO.ClientStorage (6132) Connected to storage: (&#39;<a href="http://ITIS.mentzdv.de" target="_blank">ITIS.mentzdv.de</a>&#39;, 8100)</span></div>


<div><span style="font-family: &#39;courier new&#39;,monospace;">2010-07-11T14:46:09 INFO ZEO.ClientStorage (6132) Testing connection &lt;ManagedClientConnection (&#39;127.0.0.1&#39;, 8100)&gt;</span></div>

<div><span style="font-family: &#39;courier new&#39;,monospace;">2010-07-11T14:46:09 INFO ZEO.ClientStorage (6132) last inval tid: &#39;\x03\x87n\x9d|\x1a\xc2\xaa&#39; 2010-07-11 04:45:29.087000</span></div>

<div><font face="&#39;courier new&#39;, monospace"><br></font></div><div><span style="font-family: &#39;courier new&#39;,monospace;">2010-07-11T14:46:09 INFO ZEO.ClientStorage (6132) last transaction: &#39;\x00\x00\x00\x00\x00\x00\x00\x00&#39; 1900-01-01 00:00:00.000000</span></div>


<div><span style="font-family: &#39;courier new&#39;,monospace;">2010-07-11T14:46:09 INFO ZEO.zrpc.Connection(C) (<a href="http://127.0.0.1:8100" target="_blank">127.0.0.1:8100</a>) received handshake &#39;Z303&#39;</span></div>


<div><span style="font-family: &#39;courier new&#39;,monospace;">2010-07-11T14:46:10 INFO ZEO.ClientStorage (6132) Verifying cache</span></div><div><span style="font-family: &#39;courier new&#39;,monospace;">2010-07-11T14:46:10 INFO ZEO.ClientStorage (6132) Server authentication protocol None</span></div>


<div><span style="font-family: &#39;courier new&#39;,monospace;">2010-07-11T14:46:10 INFO ZEO.ClientStorage (6132) Connected to storage: (&#39;<a href="http://ITIS.mentzdv.de" target="_blank">ITIS.mentzdv.de</a>&#39;, 8100)</span></div>


<div><span style="font-family: &#39;courier new&#39;,monospace;">2010-07-11T14:46:10 INFO ZEO.ClientStorage (6132) No verification necessary (last_inval_tid up-to-date)</span></div><div><span style="font-family: &#39;courier new&#39;,monospace;">2010-07-11T14:46:10 INFO ZEO.ClientStorage (6132) endVerify finishing</span></div>


<div><span style="font-family: &#39;courier new&#39;,monospace;">2010-07-11T14:46:10 INFO ZEO.ClientStorage (6132) endVerify finished</span></div></div><div><font face="&#39;courier new&#39;, monospace"><br>

</font></div><div><br></div><div>The problem is that whenever we hit a session bound page we get following error and stack trace:</div><div><br></div><div><div><font face="&#39;courier new&#39;, monospace">2010-07-11T14:58:12 ERROR ZODB.Connection Couldn&#39;t load state for 0x82</font></div>


<div><font face="&#39;courier new&#39;, monospace">Traceback (most recent call last):</font></div><div><font face="&#39;courier new&#39;, monospace">  File &quot;g:\mentzdv\plone\instances\zeo04\zope2\lib\python\ZODB\Connection.py&quot;, line 761, in setstate</font></div>


<div><font face="&#39;courier new&#39;, monospace">    self._setstate(obj)</font></div><div><font face="&#39;courier new&#39;, monospace">  File &quot;g:\mentzdv\plone\instances\zeo04\zope2\lib\python\ZODB\Connection.py&quot;, line 801, in _setstate</font></div>


<div><font face="&#39;courier new&#39;, monospace">    p, serial = self._storage.load(obj._p_oid, self._version)</font></div><div><font face="&#39;courier new&#39;, monospace">  File &quot;G:\mentzdv\plone\instances\zeo04\zope2\lib\python\ZEO\ClientStorage.py&quot;, line 727, in load</font></div>


<div><font face="&#39;courier new&#39;, monospace">    return self.loadEx(oid, version)[:2]</font></div><div><font face="&#39;courier new&#39;, monospace">  File &quot;G:\mentzdv\plone\instances\zeo04\zope2\lib\python\ZEO\ClientStorage.py&quot;, line 750, in loadEx</font></div>


<div><font face="&#39;courier new&#39;, monospace">    data, tid, ver = self._server.loadEx(oid, version)</font></div><div><font face="&#39;courier new&#39;, monospace">  File &quot;G:\mentzdv\plone\instances\zeo04\zope2\lib\python\ZEO\ServerStub.py&quot;, line 196, in loadEx</font></div>


<div><font face="&#39;courier new&#39;, monospace">    return self.rpc.call(&quot;loadEx&quot;, oid, version)</font></div><div><font face="&#39;courier new&#39;, monospace">  File &quot;G:\mentzdv\plone\instances\zeo04\zope2\lib\python\ZEO\zrpc\connection.py&quot;, line 650, in call</font></div>


<div><font face="&#39;courier new&#39;, monospace">    raise inst # error raised by server</font></div><div><font face="&#39;courier new&#39;, monospace">KeyError: &#39;\x00\x00\x00\x00\x00\x00\x00\x82&#39;</font></div>

</div><div><br></div><div><br></div><div>In the ZMI under the Control-Panel/Database Tab the temporary database seems to be fine. The /temp_folder returns a similar stack trace though:</div><div><h2><font face="&#39;courier new&#39;, monospace">Site Error</font></h2>



  <p><font face="&#39;courier new&#39;, monospace">An error was encountered while publishing this resource.
  </font></p>
  <p><b><font face="&#39;courier new&#39;, monospace">KeyError</font></b></p><font face="&#39;courier new&#39;, monospace">

  Sorry, a site error occurred.</font><p></p><p><font face="&#39;courier new&#39;, monospace">Traceback (innermost last):
</font></p><ul>

<li><font face="&#39;courier new&#39;, monospace">  Module ZPublisher.Publish, line 202, in publish_module_standard</font></li>

<li><font face="&#39;courier new&#39;, monospace">  Module ZPublisher.Publish, line 150, in publish</font></li>

<li><font face="&#39;courier new&#39;, monospace">  Module plone.app.linkintegrity.monkey, line 21, in zpublisher_exception_hook_wrapper</font></li>

<li><font face="&#39;courier new&#39;, monospace">  Module Zope2.App.startup, line 221, in zpublisher_exception_hook</font></li>

<li><font face="&#39;courier new&#39;, monospace">  Module ZPublisher.Publish, line 119, in publish</font></li>

<li><font face="&#39;courier new&#39;, monospace">  Module ZPublisher.mapply, line 88, in mapply</font></li>

<li><font face="&#39;courier new&#39;, monospace">  Module ZPublisher.Publish, line 42, in call_object</font></li>

<li><font face="&#39;courier new&#39;, monospace">  Module App.special_dtml, line 65, in __call__</font></li>

<li><font face="&#39;courier new&#39;, monospace">  Module DocumentTemplate.DT_String, line 476, in __call__</font></li>

<li><font face="&#39;courier new&#39;, monospace">  Module Products.Transience.Transience, line 926, in housekeep</font></li>

<li><font face="&#39;courier new&#39;, monospace">  Module Products.Transience.Transience, line 929, in _housekeep</font></li>

<li><font face="&#39;courier new&#39;, monospace">  Module Products.Transience.Transience, line 569, in _finalize</font></li>

<li><font face="&#39;courier new&#39;, monospace">  Module Products.Transience.Transience, line 593, in _do_finalize_work</font></li>

<li><font face="&#39;courier new&#39;, monospace">  Module ZODB.Connection, line 761, in setstate</font></li>

<li><font face="&#39;courier new&#39;, monospace">  Module ZODB.Connection, line 801, in _setstate</font></li>

<li><font face="&#39;courier new&#39;, monospace">  Module ZEO.ClientStorage, line 727, in load</font></li>

<li><font face="&#39;courier new&#39;, monospace">  Module ZEO.ClientStorage, line 750, in loadEx</font></li>

<li><font face="&#39;courier new&#39;, monospace">  Module ZEO.ServerStub, line 196, in loadEx</font></li>

<li><font face="&#39;courier new&#39;, monospace">  Module ZEO.zrpc.connection, line 650, in call</font></li>

</ul><font face="&#39;courier new&#39;, monospace">KeyError: &#39;\x00\x00\x00\x00\x00\x00\x00\x82&#39; (Also, the following
error occurred while attempting to render the standard error message,
please see the event log for full details: You are not allowed to
access &#39;title_or_id&#39; in this context)</font></div><div><div><br></div><div>We know for a fact that one client instance needs to create the actual temporary container at the ZEO server upon its restart. Restarting a single client instance will make make this instance work but unfortunately won&#39;t recover all other client instances. All of those problems disappear as soon as we restart all instances; until the next ZEO server restart of course. The problem doesn&#39;t appear to happen if connections drops happen but the ZEO server keeps running.</div>


<div><br></div><div>Is that behavior intentional? Any kind of help is very much appreciated.</div><div><br></div><div>We&#39;re currently using following versions (yes, we&#39;re also running on windows but I find it hard to believe that the OS is causing those issues).</div>


<div><br></div><div><div><font face="&#39;courier new&#39;, monospace">Zope Version
  </font></div>
  
  
  <div><font face="&#39;courier new&#39;, monospace">
  (Zope 2.10.9-final, python 2.4.4, win32)
  </font></div>
  


  
  <div><font face="&#39;courier new&#39;, monospace">
  Python Version
  </font></div>
  
  
  <div><font face="&#39;courier new&#39;, monospace">
  2.4.4 (#71, Oct 18 2006, 08:34:43) [MSC v.1310 32 bit (Intel)]
  </font></div>
  


  
  <div><font face="&#39;courier new&#39;, monospace">
  System Platform
  </font></div>
  
  
  <div><font face="&#39;courier new&#39;, monospace">
  win32
  </font></div>
  


  
  <div><font face="&#39;courier new&#39;, monospace">
  SOFTWARE_HOME
  </font></div>
  
  
  <div><font face="&#39;courier new&#39;, monospace">
  G:\mentzdv\plone\instances\zeo04\zope2\lib\python
  </font></div>
  


  
  <div><font face="&#39;courier new&#39;, monospace">
  ZOPE_HOME
  </font></div>
  
  
  <div><font face="&#39;courier new&#39;, monospace">
  G:\mentzdv\plone\instances\zeo04\zope2
  </font></div>
  


  
  <div><font face="&#39;courier new&#39;, monospace">
  INSTANCE_HOME
  </font></div>
  
  
  <div><font face="&#39;courier new&#39;, monospace">
  G:\mentzdv\plone\instances\zeo04\parts\instance1
  </font></div>
  


  
  <div><font face="&#39;courier new&#39;, monospace">
  CLIENT_HOME
  </font></div>
  
  
  <div><font face="&#39;courier new&#39;, monospace">
  G:\mentzdv\plone\instances\zeo04\var\instance1
  </font></div>
  


  
  <div><font face="&#39;courier new&#39;, monospace">
  Network Services
  </font></div>
  
  
  <div><font face="&#39;courier new&#39;, monospace">
      ZServer.HTTPServer.zhttp_server (Port: 8101)<br></font>
    </div>
  


  
  <div><font face="&#39;courier new&#39;, monospace">
  Process Id
  </font></div>
  
  
  <div><font face="&#39;courier new&#39;, monospace">
  6132 (5328)
  </font></div>
  


  
  <div><font face="&#39;courier new&#39;, monospace">
  Running For
  </font></div>
  
  
  <div><font face="&#39;courier new&#39;, monospace">
   1 hour 3 min 34 sec   </font></div></div><div><br></div><div>Thanks,</div><div>Sebastian</div></div>
<br>_______________________________________________<br>
Zope-Dev maillist  -  <a href="mailto:Zope-Dev@zope.org">Zope-Dev@zope.org</a><br>
<a href="https://mail.zope.org/mailman/listinfo/zope-dev" target="_blank">https://mail.zope.org/mailman/listinfo/zope-dev</a><br>
**  No cross posts or HTML encoding!  **<br>
(Related lists -<br>
 <a href="https://mail.zope.org/mailman/listinfo/zope-announce" target="_blank">https://mail.zope.org/mailman/listinfo/zope-announce</a><br>
 <a href="https://mail.zope.org/mailman/listinfo/zope" target="_blank">https://mail.zope.org/mailman/listinfo/zope</a> )<br>
<br></blockquote></div><br><br clear="all"><br>-- <br>Dragos Chirila<br><a href="mailto:objectValues@gmail.com">objectValues@gmail.com</a><br>(+4) 0722 395375<br><br>
<div style="visibility: hidden; display: inline;" id="avg_ls_inline_popup"></div><style type="text/css">#avg_ls_inline_popup {  position:absolute;  z-index:9999;  padding: 0px 0px;  margin-left: 0px;  margin-top: 0px;  width: 240px;  overflow: hidden;  word-wrap: break-word;  color: black;  font-size: 10px;  text-align: left;  line-height: 13px;}</style>