Subject Negative sweep gap, freezing system, crazy number of active transactions
Author Glebas
Hello,

Server: FB1.53 SuperServer on Win2003 Server/NTFS (default
firebird.conf, no UDF).
Client: 20-30 simultaneous Windows clients (C++/native FB API,
single-thread)

- something mysterious happens (yesterday, between 10:02 and 10:17);
- some users' (not all) client application freezing for a long time;
- then (I guess) one of them with access to the server decides to
restart the firebird server (yesterday, at 10:22).

Here is Firebird.log:

--------------------------------------------------------------------
SERVER (Server) Tue May 02 10:22:04 2006
Shutting down the Firebird service with 13 active
connection(s) to 1 database(s)
--------------------------------------------------------------------

Here is server transaction status log at around that time:

HH:MM OI OA OS NT SG AT
09:32 30591 30592 30592 30593 1 4215880
09:47 31045 31046 31046 31047 1 4215880
10:02 31353 31354 31354 31355 1 4215880
10:17 31618 31619 31598 31716 -20 31712
10:32 31618 32069 32069 32070 451 4215880
10:47 31618 32462 32462 32463 844 4215880
11:02 31618 32850 32850 32861 1232 32850

The time of this failure is not constant, everyday is different,
some days the issue doesn't show up at all.

My questions:

1) What could be that something that happens and results in freezing
the system?

2) How can the sweep gap be negative? I thought it is zero or
positive by definition?

3) Client application only uses two types of transactions:
static char isc_tpb[5] = { isc_tpb_version1, isc_tpb_read,
isc_tpb_read_committed, isc_tpb_rec_version, isc_tpb_wait };
static char isc_tpb[5] = { isc_tpb_version1, isc_tpb_write,
isc_tpb_read_committed, isc_tpb_rec_version, isc_tpb_wait };

and it never uses snapshot transactions nor backup is going on at
that time.
Then what does Oldest Snapshot (OS) number really mean then?
And how it can become lower than OI?

4) Why a number of active transactions (AT) is so crazy? :)

Thank you,
Glebas