Subject Re: fbserver and 100% of one core of cpu usage REFdn4055716621
Author hvlad
--- In firebird-support@yahoogroups.com, "dennis" wrote:

As i already said recently - always tell Firebird version !


> Here is the firebird.log, please read my notes prefixed with “---“
>
>
>
> --- the application is running as well, but something happen on firebird server, see the log what reports
>
>
>
> SERVERVENIZ (Server) Mon Mar 15 11:21:39 2010
>
> XNET error: get_free_slot() failed
>
> --- hmmm I don’t know… by th way


There was a few bug's fixed in this regards. You can search tracker for details.

> SERVERVENIZ (Server) Mon Mar 15 11:21:39 2010
>
> Database:
>
> unknown ISC error 0
>
>
>
> --- what is really means this error message?

Related to the error message above.

> SERVERVENIZ (Server) Mon Mar 15 13:13:21 2010
>
> XNET error: connection lost: another side is dead

Server lost connection with client. Probably client was died.


> --- At this point, till now, the application has reported error messages like “connection lost”.

Seems application can't handle this error and tried to work with invalid connection handle.

> --- Next the user closed the application, and then the Firebird (as shown below) was terminated and automatically reloaded.
>
>
>
>
>
> SERVERVENIZ (Client) Mon Mar 15 13:13:21 2010
>
> C:\Program Files\Firebird\Firebird_2_0\bin\fbserver.exe: terminated abnormally (4294967295)


Firebird was crashed by some reason. Follow instructions at

http://www.ibphoenix.com/main.nfs?a=ibphoenix&s=1254244067:355713&l=;PAGES;NAME=%27ibp_pdb_win32%27

But first make sure you used latest stable release of Firebird (in your case i guess you need 2.0.5)


> SERVERVENIZ (Client) Mon Mar 15 13:13:23 2010
>
> Guardian starting: C:\Program Files\Firebird\Firebird_2_0\bin\fbserver.exe

Don't use guardian on modern OS


> --- Description of the problem:
>
> --- At this point, the application hasn’t been loaded again, so the database should be not used from any client application. But something is going wrong and unknown. When then fbserver.exe launched, the one core of the cpu is working 100%, suddenly 862mb of ram occupied from fbserver, the memory usage in general was peaked from 350mb to 2,1gb, the database file is locked (i.e.: we cannot rename it) and all these started when the fbserver.exe launched after abnormal termination.
>
>
>
> --- If we launch the application at this point, it is working well with this database file, but is it extremely slow! Of course there is something wrong here, maybe the file is corrupted the firebird do something like sweep. I said maybe, I don’t know.

This is a sweep, see below

> Here is the gstat report from this database (requested as the core of the cpu is used 100%)
>
>
>
> Database header page information:
>
> Flags 0
> Checksum 12345
> Generation 8650005
> Page size 16384
> ODS version 11.0
> Oldest transaction 8362584
> Oldest active 8649781
> Oldest snapshot 8649775
> Next transaction 8649998
...
> Variable header data:
> Sweep interval: 20000

You see : Next (8649998) - OIT (8362584) = 287414 and it is much greater than Sweep interval (20000). Thus this is a sweep, obviously.


As for huge memory usage :
a) how many databases are served by this Firebird instance ?
b) what is the value of DefaultDbCachePages setting ?


Regards,
Vlad