Subject | Re: [firebird-support] Re: Refreshing MON@ATTACHMENTS: Limiting the number of users |
---|---|
Author | Carlos H. Cantu |
Post date | 2013-05-06T18:24:52Z |
Ok, so what you want is to get the real number of active connections
in your database, correct? So, it seems that I didnt understand you
question initially.
MON$ATTACHMENTS will return the number of active connections, that can
include the ones Firebird "thinks" are still active. This can include
connections that were lost in some abnormal way, but Firebird wasn't
still notified about this. You can change this "notification" time
altering the TCPIP KeepAlive parameter (search internet to know how),
or trying to use the DummyPacketsInterval setting in firebird.conf
PS: The default of TCPIP is to notify Firebird about crashed
connections only after 2 hours.
Carlos
Firebird Performance in Detail - http://videos.firebirddevelopersday.com
www.firebirdnews.org - www.FireBase.com.br
h> Sorry, but I still don't understand. I would like to refresh the
h> attachment records after a remote user has an unnatural disconnect.
h> For example, Windows freezes and the user must reboot. With my
h> application, the connection count must be accurate. So, if you
h> would kindly give me an example of how I can refresh that table. Sorry to be so dumb.
h> --- In firebird-support@yahoogroups.com, "Carlos H. Cantu" <listas@...> wrote:
h> ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
h> Visit http://www.firebirdsql.org and click the Resources item
h> on the main (top) menu. Try Knowledgebase and FAQ links !
h> Also search the knowledgebases at http://www.ibphoenix.com
h> ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
h> Yahoo! Groups Links
in your database, correct? So, it seems that I didnt understand you
question initially.
MON$ATTACHMENTS will return the number of active connections, that can
include the ones Firebird "thinks" are still active. This can include
connections that were lost in some abnormal way, but Firebird wasn't
still notified about this. You can change this "notification" time
altering the TCPIP KeepAlive parameter (search internet to know how),
or trying to use the DummyPacketsInterval setting in firebird.conf
PS: The default of TCPIP is to notify Firebird about crashed
connections only after 2 hours.
Carlos
Firebird Performance in Detail - http://videos.firebirddevelopersday.com
www.firebirdnews.org - www.FireBase.com.br
h> Sorry, but I still don't understand. I would like to refresh the
h> attachment records after a remote user has an unnatural disconnect.
h> For example, Windows freezes and the user must reboot. With my
h> application, the connection count must be accurate. So, if you
h> would kindly give me an example of how I can refresh that table. Sorry to be so dumb.
h> --- In firebird-support@yahoogroups.com, "Carlos H. Cantu" <listas@...> wrote:
>>h> ------------------------------------
>> h> Can the initial, commited transaction transaction be a simple select query?
>>
>> Not sure if I understand your question. The transaction I'm talking
>> about is the transaction associated with the query (select) ran
>> against the monitoring table.
>>
>> Carlos
>> Firebird Performance in Detail - http://videos.firebirddevelopersday.com
>> www.firebirdnews.org - www.FireBase.com.br
>>
>>
>>
>>
>> h> --- In firebird-support@yahoogroups.com, "Carlos H. Cantu" <listas@> wrote:
>> >>
>> >> h> How can I force a refresh of MON$ATTACHMENTS from a Delphi application?
>> >>
>> >> Afaik, the only way is to commit actual transaction associated to the
>> >> mon$ query, start a new transaction and run the query again.
>> >>
>> >> Carlos
>> >> Firebird Performance in Detail - http://videos.firebirddevelopersday.com
>> >> www.firebirdnews.org - www.FireBase.com.br
>> >>
>>
>>
>>
>>
>> h> ------------------------------------
>>
>> h> ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
>>
>> h> Visit http://www.firebirdsql.org and click the Resources item
>> h> on the main (top) menu. Try Knowledgebase and FAQ links !
>>
>> h> Also search the knowledgebases at http://www.ibphoenix.com
>>
>> h> ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
>> h> Yahoo! Groups Links
>>
h> ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
h> Visit http://www.firebirdsql.org and click the Resources item
h> on the main (top) menu. Try Knowledgebase and FAQ links !
h> Also search the knowledgebases at http://www.ibphoenix.com
h> ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
h> Yahoo! Groups Links