[Zope] ZEO Strange Session KeyError When Load Balanced

Michael Dunstan michael at looma.co.nz
Fri Feb 11 21:46:43 EST 2005


Hi Jason,

It'd be worth checking that the clocks on your ZEO clients are somewhat  
consistent.

(I remember stress testing a ZEO configuration much like yours. Seemed  
to work just fine. However I only had the single CPU to host the whole  
test on. So there is a non small difference our configurations.)

Alternatives that might be worth exploring:

- Disable inband housekeeping. And use a single ZEO client to run the  
housekeeping. (See Products/Transience/Transience.py)

- Try with no session expiration. That's unlikely to be mode you want  
to operate in I suspect. But it might be a useful trouble shooting  
step.

- Use FileStorage rather than TemporaryStorage for the session store on  
the ZEO server. Obviously you'd need to pack that from time to time.

Michael.

On 11/02/2005, at 8:06, Jason J. W. Williams wrote:

> Chris,
>
>    Here's the traceback. Thanks.
>
> -Jason
>
> Time    2005/02/10 19:02:49.068 GMT
> User Name (User Id)     williamsjj at testsite.com  
> (williamsjj at testsite.com)
> Request URL     https://portal.testsite.com/index_html
> Exception Type  KeyError
> Exception Value         1108062160
>
> Traceback (innermost last):
>
>    * Module ZPublisher.Publish, line 101, in publish
>    * Module ZPublisher.mapply, line 88, in mapply
>    * Module ZPublisher.Publish, line 39, in call_object
>    * Module Shared.DC.Scripts.Bindings, line 306, in __call__
>    * Module Shared.DC.Scripts.Bindings, line 343, in _bindAndExec
>    * Module Products.PageTemplates.ZopePageTemplate, line 222, in _exec
>    * Module Products.PageTemplates.PageTemplate, line 96, in pt_render
>      <ZopePageTemplate at /Artemis/index_html>
>    * Module TAL.TALInterpreter, line 190, in __call__
>    * Module TAL.TALInterpreter, line 234, in interpret
>    * Module TAL.TALInterpreter, line 637, in do_condition
>    * Module TAL.TALInterpreter, line 234, in interpret
>    * Module TAL.TALInterpreter, line 484, in do_insertText_tal
>    * Module Products.PageTemplates.TALES, line 227, in evaluateText
>    * Module Products.PageTemplates.TALES, line 221, in evaluate
>      URL: /Artemis/index_html
>      Line 62, Column 6
>      Expression: <PythonExpr here.set_sorting('date','desc')>
>      Names:
>
> {'container': <Folder instance at 415a0c80>,
> 'context': <Folder instance at 415a0c80>,
> 'default': <Products.PageTemplates.TALES.Default instance at  
> 0x40e824ac>,
> 'here': <Folder instance at 415a0c80>,
> 'loop': <SafeMapping instance at 413679f0>,
> 'modules': <Products.PageTemplates.ZRPythonExpr._SecureModuleImporter
> instance at 0x40e8238c>,
> 'nothing': None,
> 'options': {'args': ()},
> 'repeat': <SafeMapping instance at 413679f0>,
> 'request': <HTTPRequest, URL=https://portal.testsite.com/index_html>,
> 'root': <Application instance at 41591dd0>,
> 'template': <ZopePageTemplate at /Artemis/index_html>,
> 'traverse_subpath': [],
> 'user': williamsjj at testsite.com}
>
>    * Module Products.PageTemplates.ZRPythonExpr, line 47, in __call__
>      __traceback_info__: here.set_sorting('date','desc')
>    * Module Python expression "here.set_sorting('date','desc')", line
> 1, in <expression>
>    * Module Shared.DC.Scripts.Bindings, line 306, in __call__
>    * Module Shared.DC.Scripts.Bindings, line 343, in _bindAndExec
>    * Module Products.PythonScripts.PythonScript, line 323, in _exec
>    * Module None, line 9, in set_sorting
>      <PythonScript at /Artemis/set_sorting>
>      Line 9
>    * Module ZPublisher.HTTPRequest, line 1218, in __getattr__
>    * Module ZPublisher.HTTPRequest, line 1178, in get
>    * Module Products.Sessions.SessionDataManager, line 94, in  
> getSessionData
>    * Module Products.Sessions.SessionDataManager, line 181, in
> _getSessionDataObject
>    * Module Products.Transience.Transience, line 843, in  
> new_or_existing
>    * Module Products.Transience.Transience, line 446, in __setitem__
>
> KeyError: 1108062160
>
> Display traceback as text
>
> REQUEST
> form
> __ac_persistent '1'
> came_from       'https://portal.testsite.com/index_html'
> submit  'Sign In'
> cookies
> _ZopeId '01406898A1sl9qU3LHc'
> lazy items
> SESSION <bound method SessionDataManager.getSessionData of
> <SessionDataManager instance at 415a0b00>>
> other
> __ac_persistent '1'
> TraversalRequestNameStack       []
> AUTHENTICATED_USER      williamsjj at testsite.com
> URL     'https://portal.testsite.com/index_html'
> VirtualRootPhysicalPath ('', 'Artemis')
> VIRTUAL_URL     'https://portal.testsite.com/index_html'
> SERVER_URL      'https://portal.testsite.com'
> AUTHENTICATION_PATH     'Artemis/VirtualHostMonster//'
> traverse_subpath        []
> PUBLISHED       <ZopePageTemplate at /Artemis/index_html>
> came_from       'https://portal.testsite.com/index_html'
> ACTUAL_URL      'https://portal.testsite.com/index_html'
> VIRTUAL_URL_PARTS       ('https://portal.testsite.com', 'index_html')
> URL0    https://portal.testsite.com/index_html
> URL1    https://portal.testsite.com
> BASE0   https://portal.testsite.com
> BASE1   https://portal.testsite.com
> BASE2   https://portal.testsite.com/index_html
> environ
> HTTP_MAX_FORWARDS       '10'
> HTTP_REFERER
> 'https://portal.testsite.com/login/login_form?came_from=https%3A// 
> portal.testsite.com/index_html&retry=&disable_cookie_login__=1'
> HTTP_ACCEPT_LANGUAGE    'en-us,en;q=0.5'
> SERVER_SOFTWARE 'Zope/(Zope 2.7.4-0, python 2.3.3, linux2) ZServer/1.1'
> SCRIPT_NAME     ''
> REQUEST_METHOD  'POST'
> PATH_INFO
> '/VirtualHostBase/https/portal.testsite.com:443/Artemis/ 
> VirtualHostRoot/index_html'
> SERVER_PROTOCOL 'HTTP/1.1'
> channel.creation_time   1108062158
> HTTP_X_FORWARDED_SERVER 'portal.testsite.com'
> CONTENT_LENGTH  '144'
> HTTP_ACCEPT_CHARSET     'ISO-8859-1,utf-8;q=0.7,*;q=0.7'
> HTTP_USER_AGENT 'Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US;
> rv:1.7) Gecko/20040707 Firefox/0.9.2'
> HTTP_COOKIE     '_ZopeId="01406898A1sl9qU3LHc"'
> SERVER_NAME     'portal1.testsite.com'
> REMOTE_ADDR     '127.0.0.1'
> HTTP_VIA        '1.1 portal.testsite.com'
> PATH_TRANSLATED
> '/VirtualHostBase/https/portal.testsite.com:443/Artemis/ 
> VirtualHostRoot/index_html'
> SERVER_PORT     '8080'
> HTTP_HOST       'localhost:8080'
> HTTP_ACCEPT
> 'text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/ 
> plain;q=0.8,image/png,*/*;q=0.5'
> GATEWAY_INTERFACE       'CGI/1.1'
> HTTP_X_FORWARDED_FOR    '66.213.154.102'
> HTTP_X_FORWARDED_HOST   'portal.testsite.com'
> CONTENT_TYPE    'application/x-www-form-urlencoded'
> HTTP_ACCEPT_ENCODING    'gzip,deflate'
>
>
> On Thu, 10 Feb 2005 13:46:34 -0500, Chris McDonough <chrism at plope.com>  
> wrote:
>> Hi Jason,
>>
>> Please keep the discussion on the list, thanks...
>>
>> No, there are no other products that need to be updated.   At this
>> point, we'll need to see a full traceback (see the "error_log" object)
>> to figure out what's happening.
>>
>> On Thu, 2005-02-10 at 13:44, Jason J. W. Williams wrote:
>>> Yes I am. I was using 2.7.2 when the issue cropped up so I upgraded
>>> both ZEO clients and the ZEO server to 2.7.4 last night. Same problem
>>> occurs. Are there any products that need to be upgraded outside of
>>> Zope? Thank you!
>>>
>>> -Jason
>>>
>>>
>>> On Thu, 10 Feb 2005 13:27:31 -0500, Chris McDonough  
>>> <chrism at plope.com> wrote:
>>>> Hi Jason,
>>>>
>>>> Coding errors causing this symptom were present in Zopes before  
>>>> 2.7.3
>>>> but none have been reported to my knowledge thereafter.  Are you  
>>>> still
>>>> having this issue with 2.7.4?
>>>>
>>>> On Thu, 2005-02-10 at 11:44, Jason J. W. Williams wrote:
>>>>> Hello,
>>>>>
>>>>>     I hope this is the correct place to post this question as I  
>>>>> have
>>>>> not been able to resolve the problem via archives or Google. We  
>>>>> have a
>>>>> setup with one ZEO server and two ZEO clients. The goal is to put a
>>>>> load balancer in front of the two clients and have them both  
>>>>> operate
>>>>> off the same session data so that it appears as a single server to  
>>>>> the
>>>>> end user.  We setup the clients according to:
>>>>> http://longsleep.org/howto/sharesessionwithzeo
>>>>>
>>>>> However, when we run the setup whenever ZEO client 1 is hit for a  
>>>>> page
>>>>> a KeyError is generated. I assume this is because ZEO client 2 set  
>>>>> up
>>>>> the session and the data is not being shared. I upgraded us to Zope
>>>>> 2.7.4 last night in an attempt to fix the problem. Any help is  
>>>>> greatly
>>>>> appreciated. Thank you in advance.
>>>>>
>>>>> Best Regards,
>>>>> Jason
>>>>> _______________________________________________
>>>>> Zope maillist  -  Zope at zope.org
>>>>> http://mail.zope.org/mailman/listinfo/zope
>>>>> **   No cross posts or HTML encoding!  **
>>>>> (Related lists -
>>>>>  http://mail.zope.org/mailman/listinfo/zope-announce
>>>>>  http://mail.zope.org/mailman/listinfo/zope-dev )
>>>>>
>>>>
>>>>
>>>
>>
>>
> _______________________________________________
> Zope maillist  -  Zope at zope.org
> http://mail.zope.org/mailman/listinfo/zope
> **   No cross posts or HTML encoding!  **
> (Related lists -
>  http://mail.zope.org/mailman/listinfo/zope-announce
>  http://mail.zope.org/mailman/listinfo/zope-dev )
>



More information about the Zope mailing list