home contents changes options help subscribe edit (external edit)

...

Interactive prompt on a running server

Set up and start a ZEO (Zope Enterprise Objects) server and client. Now you can start one or more additional debug sessions without stopping the running site, and use pdb as on Debugging etc.:

   > /zope1/bin/zopectl debug
   Starting debugger (the name "app" is bound to the top-level Zope object)
   >>> app.objectIds()
   ['acl_users', 'Control_Panel', 'temp_folder', 'browser_id_manager', 'session_data_manager',
   'error_log', 'index_html', 'standard_error_message', 'standard_html_footer', 'standard_html_header', 
   'standard_template.pt', 'MailHost', 'zsyncer', 'vurt', 'robots.txt', 'uptime.txt', 'cmf']

Synchronizing the ZODB

When debugging a live server with ZEO (Zope Enterprise Objects), you'll sometimes get a traceback ending like this:

   File "/usr/local/src/Zope-2.7.0/lib/python/ZODB/Connection.py", line 592, in _is_invalidated
     raise ReadConflictError(object=obj)
   ZODB.POSException.ReadConflictError: database read conflict error (oid 00000000003c414b, class BTrees.OIBTree.OIBucket)

This means another client has updated the ZODB and your debug session's copy is out of date. To get rid of it, synchronize with the latest ZODB contents like this:

   >>> app._p_jar.sync()



subject:
  ( 23 subscribers )