Subject | Re: Database file grows |
---|---|
Author | Adam |
Post date | 2005-06-22T11:32:39Z |
> > > I've found two different cases for which the db file grows:crahes
> > > 1) the first is when my server app crashes. In this case the file
> > > grows when my server app restarts.
> > >
> > > 2) In this case I have the 2 applications running and when one
> > > the db file grows. I was able to simulate this situation once. Ibut let
> > > killed the second apllication (which has 16 open connections)
> > > the server app running, The db file growed from 460M to 1.07G. ThisHello Elisabete,
> > > happened in the exact moment I killed the app and there was not a
> > > backup running at that time. The fbserver was occuping about 4% CPU
> > > because the server app was still inserting records, I think.
> > >
> > > So when the file grows the fbserver is not inactive but running low
> > > (doing inserts).
> > >
> > > Elisabete
> > >
> > >
> > > > Alan
> >
> > hang on - this is just real growth being finally reported by the OS
> when the
> > disconnection of the file occurs.
> > When you connect to a db and insert records madly for ten mintues,
> nothing
> > is visibly happening to the file until you disconnect. It's then
> that the OS
> > refreshes the file statistics and you see the sudden growth.
> >
> > I think you're back to working out why your app crashes and how
> that's tied
> > to corruption if at all.
>
> You're right for a grow of some megabytes but the database file
> doubles its size and gets corrupted. And this only happens if the
> aplication crashes. If I close the aplications normaly ( the db
> connections are closed ) the file grows very little. But if I kill the
> aplications with open db connections the file gets huge.
>
> And the problem about that is that someone is killing the aplications
> in the taskManager over night. We are trying to avoid this procedure
> but meanwhile the database files get corrupted. And this can happen if
> the machine has a hard reboot.
>
> Elisabete
>
> >
> > Alan
The symptoms sound suspiciously like you have Forced Writes switched
off. Firebird can survive a hard reboot (obviously providing the hard
disk survives).
The instantaneous growth just sounds a bit like the operating system
being forced to persist to disk the db file. I imagine a hard reboot
before this is complete is going to leavee you in all sorts of bother,
so only have forced writes off if database corruption is not a concern
AND performance is critical.
Adam