Force compaction of database for Lotus Domino server?

We have had a couple of nasty experiences recently where a heavily used Lotus Notes database has gone over the 64gb limit.

The databases had some slack space which enabled us to run a database compaction to fix the problem, but taking the database offline long enough for a compaction to get exclusive use of the database was a real nightmare.

We tried:

  • Allowing users read-only access to the database while the database was compacting.
    (the compaction would fail after some time, saying that the database had been modified)
  • Removing access to all non-administrators for the database
  • Disabling replication for the database
  • drop database.nsf - to kick everyone off that database
  • dbcache flush - to Close all databases that were open in the database cache

Still users would show up as accessing the database, and not allow an exclusive mode compaction.

Eventually we resorted to:

  • Removing access to all non-administrators for the database
  • restarting the server
  • quickly typing into the server console: "compact -c databasename.nsf" before anyone tried accessing the database

Is there an easier way to kick everyone off a database and force an exclusive database compaction? We are running Lotus Domino Server 8.5.3


compact -B is "In-place with file size reduction". Give it a try if you haven't yet.

In my understanding drop db.nsf does not work. Try Drop All and if that works you could write some code that drops only users accessing that db.


Why not implementing a cluster (configured for failover) then you could switch the users over the the other one. Then you have time to fix the DB and run a compact. You could then also delete the DB and let it re-create it from the 2nd server (the re-created DB will then be already compacted).

By the way. I would enable (if not already enabled) Document & Design Compression along with LZ1 that might help to shrink the DB a little bit (depends on the content).