<html><head><meta http-equiv="Content-Type" content="text/html charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><br class=""><div><blockquote type="cite" class=""><div class="">On Feb 2, 2016, at 11:22 PM, Kristoffer &lt;<a href="mailto:kmo@b-one.net" class="">kmo@b-one.net</a>&gt; wrote:</div><br class="Apple-interchange-newline"><div class=""><div class="">When running calendar server 7.0 on a system with many calendar homes, error messages are logged from the worker system:<br class=""></div><div class=""><br class=""></div><div class="">2016-02-02 14:18:44+0000 [-] [caldav-1]&nbsp; [-] [txdav.common.datastore.sql#error] Transaction abort too long: PG-TXN&lt;ultimatelyPerform: 4041391 &lt;INBOX_CLEANUP_WORK&gt;&gt;, Statements: 214963, IUDs: <br class=""></div><div class="">0, Statement: insert into JOB (NOT_BEFORE, PRIORITY, WEIGHT, WORK_TYPE) values (%s, %s, %s, %s) returning FAILED, JOB_ID, PAUSE, OVERDUE, ASSIGNED<br class=""></div><div class="">2016-02-02 14:18:44+0000 [-] [caldav-1]&nbsp; [-] [twext.enterprise.jobs.jobitem#error] JobItem: 4041391, WorkItem: 4041374 failed: [Failure instance: Traceback: &lt;class 'twext.enterprise.ienterpri<br class=""></div><div class="">se.AlreadyFinishedError'&gt;:<br class=""></div><div class="">...<br class=""></div><div class=""><br class=""></div><div class="">The problem seems to be that InboxCleanupWork within one single transaction tries to schedule a CleanupOneInboxWork for each calendar&nbsp; home.<br class=""></div><div class=""><br class=""></div><div class="">Any suggestions for how we can get around this problem?<br class=""></div></div></blockquote><div><br class=""></div><div>For now, to stop the errors, you can disable the top-level key&nbsp;<a href="http://trac.calendarserver.org/browser/CalendarServer/trunk/conf/caldavd-stdconfig.plist#L1055" class="">InboxCleanup</a>&nbsp;in your caldavd.plist (add this key and set it to enabled: false). This will turn off the InboxCleanupWork scheduler. As the name suggest, this work deletes old / stale items from user inboxes. It is a relatively new feature, and is not required for correct server operation in the short to medium term. Over the long term, it's a useful element of a data retention policy with the goal of steady-state operation over time, instead of accruing data indefinitely. Other elements to such a policy might include&nbsp;<a href="http://trac.calendarserver.org/browser/CalendarServer/trunk/conf/caldavd-stdconfig.plist#L1041" class="">RevisionCleanup</a>&nbsp;and purging of data for deleted users (both of these behaviors are automatic and enabled by default), and the various '<a href="http://trac.calendarserver.org/browser/CalendarServer/trunk/calendarserver/tools/purge.py" class="">purge</a>' command line tools that can be run manually:</div><div><br class=""></div><div>calendarserver_purge_attachments</div><div>calendarserver_purge_principals</div><div>calendarserver_purge_events</div><div><br class=""></div><div>-dre</div></div></body></html>