Re: [firebird-support] What is wrong with transactions here?

2014-11-04 Thread 'Thomas Steinmaurer' t...@iblogmanager.com [firebird-support]
Hello,

>>> Hi!
>>> 
>>> I have some lines in firebird.log like this:
>>> ===
>>> cxv.servers.netTue Nov  4 11:37:38 2014
>>> Sweep is started by SWEEPER
>>> Database "SkyNetInt"
>>> OIT 1221095, OAT 1231335, OST 1231313, Next 139981575359934
>>> 
>>> 
>>> cxv.servers.netTue Nov  4 11:37:46 2014
>>> Sweep is finished
>>> Database "SkyNetInt"
>>> OIT 1248701, OAT 1248707, OST 1248707, Next 1248709
>>> 
>>> ===
>>
>>That's housekeeping for transactions. Depending on how applications are 
>>connect
>>to the database and how the applications are handling 
>>their connects, statements and commits - you will see a gap between the oldest
>>active and the next transaction.
> 
> I don't think this can be the reason for next transaction showing
> 139981575359934 originally, Marcus - that would require there to be about 1
> million transactions per second for five years of which one of the oldest is
> still active (I would expect this to be more than Firebird can handle and
> certainly more than enough to test the patience of any user of the database).

http://tracker.firebirdsql.org/browse/CORE-3978



--
With regards,
Thomas Steinmaurer
http://www.upscene.com

Professional Tools and Services for Firebird
FB TraceManager, IB LogManager, Database Health Check, Tuning etc.




RE: [firebird-support] What is wrong with transactions here?

2014-11-04 Thread Svein Erling Tysvær svein.erling.tysv...@kreftregisteret.no [firebird-support]
>> Hi!
>> 
>> I have some lines in firebird.log like this:
>> ===
>> cxv.servers.netTue Nov  4 11:37:38 2014
>> Sweep is started by SWEEPER
>> Database "SkyNetInt"
>> OIT 1221095, OAT 1231335, OST 1231313, Next 139981575359934
>> 
>> 
>> cxv.servers.netTue Nov  4 11:37:46 2014
>> Sweep is finished
>> Database "SkyNetInt"
>> OIT 1248701, OAT 1248707, OST 1248707, Next 1248709
>> 
>> ===
>
>That's housekeeping for transactions. Depending on how applications are 
>connect to the database and how the applications are handling 
>their connects, statements and commits - you will see a gap between the oldest 
>active and the next transaction.

I don't think this can be the reason for next transaction showing 
139981575359934 originally, Marcus - that would require there to be about 1 
million transactions per second for five years of which one of the oldest is 
still active (I would expect this to be more than Firebird can handle and 
certainly more than enough to test the patience of any user of the database).

Though I've no idea what the reason can be and leave this for others to answer,
Set


Re: [firebird-support] What is wrong with transactions here?

2014-11-04 Thread marcus mar...@antiphasis.net [firebird-support]


On 04.11.2014 16:21, simion_coro...@yahoo.fr [firebird-support] wrote:
>  
> 
> Hi!
> 
> I have some lines in firebird.log like this:
> ===
> cxv.servers.netTue Nov  4 11:37:38 2014
> Sweep is started by SWEEPER
> Database "SkyNetInt"
> OIT 1221095, OAT 1231335, OST 1231313, Next 139981575359934
> 
> 
> cxv.servers.netTue Nov  4 11:37:46 2014
> Sweep is finished
> Database "SkyNetInt"
> OIT 1248701, OAT 1248707, OST 1248707, Next 1248709
> 
> ===
That's housekeeping for transactions. Depending on how applications are
connect to the database and how the applications are handling their
connects, statements and commits - you will see a gap between the oldes
active and the next transaction.

For example, you'll need firebirds isql and a shell (cmd, bash, whatever).
Open a shell, create a database and a simple table within, one integer
will be enough. Now insert 1 integer into that table and don't commit!
Open a second shell, gstat -h with the database from above.
Open a third shell, isql with the database do a couple of inserts and
commit after each single one. A last insert, don't commit!
Change to shell number two, gstat -h again: See the difference between
oldest active and next transaction?
Now switch to the first shell and commit the insert, close isql.
What is gstat showing?
Commit the last insert from the third shell close isql.
Now you should have a difference of one between the oldest active and
the next transaction.

The bigger the gap (the transaction chain) gets, the slower each
database action gets. Sweeping tries to detect and remove commited
transactions in the chain to keep it short. The problem is: it requires
database performance. So if the database is under "heavy fire", it may
be better to disable housekeeping and trigger it manually. Another
option you should think about: How the connections and that are handled
from the application side? Do you have a chance to optimize that handling?

See also:
https://www.ibphoenix.com/resources/documents/design/doc_21
https://www.ibphoenix.com/resources/documents/general/doc_67
http://conferences.embarcadero.com/article/32280/



> 
> sometime this happen in few hours.
> 
> How can I find where is the problem?
> 
> 
> I don't know if it's important, a lot of lines is:
> 
> =
> 
> cxv.servers.netTue Nov  4 11:32:50 2014
> INET/inet_error: read errno = 104
> =
as far as i know : same as winsock 10054 : unable to connect to client


> 
> 
> Thanks!
> 
> 
> 


[Non-text portions of this message have been removed]



[firebird-support] What is wrong with transactions here?

2014-11-04 Thread simion_coro...@yahoo.fr [firebird-support]
Hi!

I have some lines in firebird.log like this:
===
cxv.servers.netTue Nov  4 11:37:38 2014
Sweep is started by SWEEPER
Database "SkyNetInt" 
OIT 1221095, OAT 1231335, OST 1231313, Next 139981575359934


cxv.servers.netTue Nov  4 11:37:46 2014
Sweep is finished
Database "SkyNetInt" 
OIT 1248701, OAT 1248707, OST 1248707, Next 1248709
 ===
 sometime this happen in few hours.
 How can I find where is the problem?
 

 I don't know if it's important, a lot of lines is:
 =

 cxv.servers.netTue Nov  4 11:32:50 2014
INET/inet_error: read errno = 104
=
 

 Thanks!