Subject Re: [firebird-support] Re: lock denied...
Author
Well, I'll try to answer myself about the C and SuperServer.
It seems that the only problem is in:
EXEC SQL SET DATABASE DB = '/var/lib/firebird/2.5/data/xxx.fdb';
When add ip adress and I change it to:
EXEC SQL SET DATABASE DB = '127.0.0.1:/var/lib/firebird/2.5/data/xxx.fdb';
then it seems to work even in SuperServer (if Firebird really runs in SuperServer after changing /opt/firebird/firebird.conf)

This brings another question - how can I recognize in which mode is Firebird running?

Best regards,
Jakub


---------- Původní e-mail ----------
Od: ehmmm.firebird@... [firebird-support] <firebird-support@yahoogroups.com>
Komu: firebird-support@yahoogroups.com
Datum: 5. 12. 2017 10:44:48
Předmět: Re: [firebird-support] Re: lock denied...
 

Thank you for your response.
Compared to you I'm just a beginner so I have other questions.

> i see no relation between such services and requirement to use SuperClassic

I din't investigate it much but I think it is becuase the C programs it is historically written something like this:

int dbConnect()
{
    EXEC SQL
        SET DATABASE DB = '/var/lib/firebird/2.5/data/xxx.fdb';
    EXEC SQL
        CONNECT DB USER 'xxx' PASSWORD 'xxx';
    ...

(Don't get confused by the "2.5" subdirectory, I did "gbak -r" to 3.0 version but I put it in the old dir.)
I think that in this case the C programs access somehow more directly and they can't cooperate with SuperServer.
But I promise I'll lokk at it.

> Try to lower load on lock manager.
Please how? Make less connections?

> Switch to Super
Discussed above.

> or try to increase linger on security3.fdb(it is 60 sec by default).
Please how?
I've found some: "ALTER DATABASE SET LINGER TO"
I guess I'll have to do it via isql and not by Flamerobin. (?)
How can I check how much is it right now?
(I've found some tip "gstat -h" which I use for sweeping monitor. But I can't see there any "linger".)
I've found some presentation that this "linger functionality" has effect whene there are no connections.
But I think that I have there new attachments almost every second. (?)

> If there was coredump produced by crash, you may provide us with backtraces of all stacks.
How can I get this dump?
I've found some document from 2008 mentioning BugcheckAbort=1 in the firebird.conf.
That's it?



Jakub


---------- Původní e-mail ----------
Od: hvlad@... [firebird-support] <firebird-support@yahoogroups.com>
Komu: firebird-support@yahoogroups.com
Datum: 5. 12. 2017 10:15:00
Předmět: [firebird-support] Re: lock denied...
 

---In firebird-support@yahoogroups.com, <ehmmm.firebird@...> wrote :


> last weekend we switched from FB 2.5.x to  FB V3.0.3.32796
>
> We have couple databases, the biggest has around 12 GB.
> About 100-200 clients are connecting to this DB via PHP approximately twice per minute to see some data.
> Some services on server are writing data into this DB.
> We are using FB in SuperClassic mode, because some services are written in C and compiled via gpre/gcc.

  Hmm... i see no relation between such services and requirement to use SuperClassic.
Сould you try Super mode ? SuperClassic in FB3 is legacy and not recommended mode.


> In firebird log I can see messages like this:
>
> z3  Sun Dec  3 01:43:15 2017
>         Database: /opt/firebird/security3.fdb
>         page 0, page type 1 lock denied (216)
...
> Could you please explain me, what do this messages mean?

  It looks like bug due to race condition when lock manager initialized shared memory while another
instance (attachment) is deinitialized it (it is simplified and far from exact description). It could be
something else - i need to reproduce the issue to make correct conclusion.


> How can I avoid them?

  Try to lower load on lock manager. Switch to Super, or try to increase linger on security3.fdb
(it is 60 sec by default).

> What shall I look at?

  If there was coredump produced by crash, you may provide us with backtraces of all stacks.

Regards,
Vlad