fb_monitor files. What is?

79 views
Skip to first unread message

Fabiano SCI

unread,
Dec 10, 2021, 8:03:36 AM12/10/21
to firebird-support
Hello. I have a customer that run Firebird 3.0.6 and on that system (Windows Server 2016) it creates a LOT of "fb_monitor_xxxx" files on temp directory.

It creates a LOT of writes to those files. Anyone knows what it is? How can I stop Firebird to do this?

Dmitry Yemanov

unread,
Dec 10, 2021, 8:33:11 AM12/10/21
to firebird...@googlegroups.com
10.12.2021 16:03, Fabiano SCI wrote:

> Hello. I have a customer that run Firebird 3.0.6 and on that system
> (Windows Server 2016) it creates a LOT of "fb_monitor_xxxx" files on
> temp directory.
>
> It creates a LOT of writes to those files. Anyone knows what it is?

Contents of MON$ tables. Why are they queried so often on that customer
site?

> How can I stop Firebird to do this?

Increase TempCacheLimit in firebird.conf / databases.conf. But better
fix the database / application to avoid accessing MON$ tables. They're
intended for DBA, not for the database itself.


Dmitry

Fabiano SCI

unread,
Dec 10, 2021, 9:48:27 AM12/10/21
to firebird-support
It worked! I put TempCacheLimit=364M and everything run smooth now! 
About your question: We have 2 uses of mon$ databases:
1) Our system checks every 15 minutes the mon$statements table to check if there is a long running query. If there is, it sents to us to be corrected (apply a new indice, rewrite, etc); (We have >1000 customers running Firebird from 1 to up 180 concurrent users, databases up to 450Gb in size but generally between 50-100Gb)

2) It checks between 20 seconds and 2 minutos (randomly) the mon$attachments table to see if there is strange connections to the database with SYSDBA account. If yes, we drop that access. It it an early attempt to block database access, that we will drop as we are now changing the SYSDBA password;

Thanks for you, 

Dimitry Sibiryakov

unread,
Dec 10, 2021, 10:37:54 AM12/10/21
to firebird...@googlegroups.com
Fabiano SCI wrote 10.12.2021 15:48:
> 1) Our system checks every 15 minutes the mon$statements table to check if there
> is a long running query. If there is, it sents to us to be corrected (apply a
> new indice, rewrite, etc);

This is the task for Trace and Audit:
https://firebirdsql.org/rlsnotesh/rnfb25-trace.html

--
WBR, SD.

Thomas Steinmaurer

unread,
Dec 13, 2021, 6:22:06 AM12/13/21
to firebird...@googlegroups.com
Fabiano,

It worked! I put TempCacheLimit=364M and everything run smooth now! 
About your question: We have 2 uses of mon$ databases:
1) Our system checks every 15 minutes the mon$statements table to check if there is a long running query. If there is, it sents to us to be corrected (apply a new indice, rewrite, etc); (We have >1000 customers running Firebird from 1 to up 180 concurrent users, databases up to 450Gb in size but generally between 50-100Gb)

As Dimitry has mentioned, this particular use case might be much less impacting when using the Firebird Trace API in particular with the following trace configuration parameter:

    # Put xxx_finish record only if its timing exceeds this number of milliseconds
    #time_threshold = 100

Setting the threshold to your desired value would then only trace/capture the _FINISH trace event for executed statements, which exceeded the threshold.

The Firebird Trace API is available since Firebird 2.5.


2) It checks between 20 seconds and 2 minutos (randomly) the mon$attachments table to see if there is strange connections to the database with SYSDBA account. If yes, we drop that access. It it an early attempt to block database access, that we will drop as we are now changing the SYSDBA password;

With Firebird 2.1+, you could also use an ON CONNECT database trigger as first line of defense, to reject database connections made by SYSDBA.
https://firebirdsql.org/refdocs/langrefupd21-ddl-trigger.html

Perhaps good enough to prevent SYSDBA connections from your customer-facing client application. gbak, isql still can be used to connect via SYSDBA then though, when providing a certain command-line option at connect time.

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

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



Thanks for you, 

Em sexta-feira, 10 de dezembro de 2021 às 10:33:11 UTC-3, Dmitry Yemanov escreveu:
10.12.2021 16:03, Fabiano SCI wrote:

> Hello. I have a customer that run Firebird 3.0.6 and on that system
> (Windows Server 2016) it creates a LOT of "fb_monitor_xxxx" files on
> temp directory.
>
> It creates a LOT of writes to those files. Anyone knows what it is?

Contents of MON$ tables. Why are they queried so often on that customer
site?

> How can I stop Firebird to do this?

Increase TempCacheLimit in firebird.conf / databases.conf. But better
fix the database / application to avoid accessing MON$ tables. They're
intended for DBA, not for the database itself.


Dmitry
--
You received this message because you are subscribed to the Google Groups "firebird-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email to firebird-suppo...@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/firebird-support/8ab86ef2-6608-4bcf-8167-e015909b633dn%40googlegroups.com.

  
Reply all
Reply to author
Forward
0 new messages