"Unable to record which documents have been processed by the agent"

I have a LotusScipt agent running on new or modified documents in a database with a large number of documents (> 350,000). When the agent completes I get the error “Unable to record which documents has been processed by the agent. Try making a new replica”

Initially I assumed this would be due to a limit on the number of documents that can be marked as processed (as per this doument http://www-01.ibm.com/support/docview.wss?uid=swg1LO48849&myns=swglotus&mynp=OCSSKTWP&mync=R)

However, I changed my code to end processing after a single document had been processed and still got the same error.

Can anyone suggest any other reasons as to why this error might occur?

Many thanks.