Subject: RE: Re: Increasing Notes Mail Database (NSF) Size
I have found the problem. The problem is basically occurring when we open a document which was not closed properly last time it was used. MIME-CD conversion is done every time we open such document, but if the most recent open on this document is gracefully closed, then this conversion doesnt increase database size.
Moreover, the problem is also in new R6 (ODS43) copy of this database created from R5 database using compact/New replica/new copy.
So in summary, here are the conditions in which increase in database size will occur when we open a document :
-
document contains attachments
-
document is doing MIME-CD conversion. This is happenning always if we use an R5 database or its R6 copy on Domino 6 server. The databases created in R6 right from scratch doesnt found to be causing this.
-
The most recent open on this document is not closed using lnDoc.Close(). The destructor of LNDocument object doesnt seem to be doing this and that’s why this problem is happenning.
Now let me share with you what’s going in conceptually according to me in these conditions:
It seems that such documents contains attachments stored in MIME format, but there is some flag set in such databases due to which whenever documents in such database are opened, MIME-CD conversion is done that converts document MIME attachmments to NotesRichtext format and stores the converted object internally in database for later use.
When the document is properly closed, this new object is destroyed. But in condition when we dont close document and LNDocument object goes out of scope, this new object is already commited to database but its reference is lost and hence new NotesRichText object is created for each subsequent open on this document and hence size increases.
Moreover, it is seen that if we iterate all notes documents in such database without closing them, whenever database object is destroyed (when it goes out of scope), all objects created by these documents are stored in database consistently. This results in a larger increase in database size. But now if we do same iteration again, all objects are already in place and hence no increase in size noticed.
Now consider another interesting condition in above scenario, if after iterating all documents, you kill the process before database object goes out of scope, all these object’s references are lost and they will again be added in next iteration, resulting in increase in database size again and again.
That’s the case which was happenning with us, in a test which i have done, 13 MB is added to a 49.5 MB database each time such iteration is done without letting database object to go for destruction using ‘Kill process’ before it goes out of scope.
…(can cause DoS attack on Notes database by exhausting the hard drive)
-Harvijay 