[Zope-dev] Root partition growing uncontrolably during atransaction

Jim Fulton jim@digicool.com
Thu, 02 Sep 1999 08:26:49 -0400


Scott Robertson wrote:
> 
> On Wed, 1 Sep 1999, Jason Spisak wrote:
> 
> > Scott,
> >
> > My /tmp had only one file and that was for KDE in it.  ls -a revealed
> > nothing else in there.  I looked in all of the tmp directories, because
> > I thought the same thing.
> >
> 
> Ok round #2, I remember Jim babeling about temp files one time when I
> visited DC. He had mentioned something about creating a temp file and
> unlinking the file descriptor or something like that. The point was that
> this was the "proper" way to handle a temp file because if your program
> crashed the file storage would be reclaimed by the OS. It sounded really
> cool. So maybe this is what is happening here.

Unlinking temporary files after creation is a standard Unix trick to
assure temporary file garbage collection.

Zope uses temprary files for sub-transactions.  So perhaps this is
what is accounting for the disk usage.  Zope uses the TemporaryFile
class in the standard Python tmpfile module.  You can look at that 
so see how this works.

Jim

--
Jim Fulton           mailto:jim@digicool.com   Python Powered!        
Technical Director   (888) 344-4332            http://www.python.org  
Digital Creations    http://www.digicool.com   http://www.zope.org    

Under US Code Title 47, Sec.227(b)(1)(C), Sec.227(a)(2)(B) This email
address may not be added to any commercial mail list with out my
permission.  Violation of my privacy with advertising or SPAM will
result in a suit for a MINIMUM of $500 damages/incident, $1500 for
repeats.