Icon View Thread

The following is the text of the current message along with any replies.
Messages 1 to 10 of 10 total
Thread Error 300 cannot lock the catalog DB1 in the database DB1 for read access
Tue, Mar 8 2016 1:30 PMPermanent Link

Accowin

LBRP

Avatar

Hello,

Sometimes when a user starts our application he gets the error 'Error 300 cannot lock the catalog DB1 in the database DB1 for read access'. If we retry to start the application again then it works. It takes a while before we get this error the application hangs for several minutes.
We think that this error happens when we call the function to open the database

What can be the reason for this problem?

This is in an environment with 20 simultaneous users.

Thanks.

Regards,
Jeffrey
Tue, Mar 8 2016 1:34 PMPermanent Link

Accowin

LBRP

Avatar

The next line is wrong.
It takes a while before we get this error the application hangs for several minutes.

It should be:
If we have this kind of error than our application hangs for several minutes and then we see that error.
Wed, Mar 9 2016 3:04 AMPermanent Link

Roy Lambert

NLH Associates

Team Elevate Team Elevate

Accowin


It will depend on what the start up portion of your code does. Something will be doing something that requires exclusive access to the database (probably the catalog) and you're getting two or more hitting it at the same time. Normally when people log on there'll be a bit of a gap between each of them (a few seconds will be enough) so it doesn't happen.

There's an example in the manual showiong error trapping for this and handling it.

Roy Lambert
Wed, Mar 9 2016 3:51 AMPermanent Link

Accowin

LBRP

Avatar

Hello Roy,

Thanks for the reply.

Code:
   session.Open;
   database.Open; <- when calling this function we get sometimes the error

The application running at our customer is used by 30 simultaneous users that all make connection to database DB1. Remote connection is used.
The database service has around 2600 databases. Can this high number of databases can be the problem?

We are still using elevate version 2.14 build 5


Thanks.

Regards,
Jeffrey
Wed, Mar 9 2016 5:37 AMPermanent Link

Roy Lambert

NLH Associates

Team Elevate Team Elevate

Accowin


> session.Open;
> database.Open; <- when calling this function we get sometimes the error
>
>The application running at our customer is used by 30 simultaneous users that all make connection to database DB1. Remote connection is used.
>The database service has around 2600 databases. Can this high number of databases can be the problem?


I seem to recall something along these lines being asked before but can't remember the answer.

What I'd recommend if a loop & try .. except block round the open eg

Counter := 0;
while (not Database.Active) and (Counter < 10) do begin
try
inc(Counter);
Database.Open;
except
Sleep(25);
end;
end;

if Counter >=10 then showmessage('woops things went wrong - shut down and try again');

Roy
Wed, Mar 9 2016 8:08 AMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Jeffrey,

<< The database service has around 2600 databases. Can this high number of databases can be the problem? >>

Are you querying this system information table at any point:

http://www.elevatesoft.com/manual?action=viewtopic&id=edb2sql&topic=Databases_Table

?

If you are, then you could be reading every single database catalog when doing so, and you'll need to turn this off via this setting:

Show Database Catalog Versions

in the EDB Server's settings file:

http://www.elevatesoft.com/manual?action=viewtopic&id=edb2sql&topic=Starting_Configuring_Server

Tim Young
Elevate Software
www.elevatesoft.com
Wed, Mar 9 2016 10:07 AMPermanent Link

Accowin

LBRP

Avatar

Hello Tim,

We have the error when we call db.Open so at that moment we did not run any query.
It is possible that at the moment that we call db.open that an onther user is running a query on the databases table and because of that we get the lock error?

We sometimes do queries on the table databases and could not understand why is sometimes takes a very long times to execute. Now we know why and how we can solve this.

We will do the change in the ini file of the customer and see if this maybe helps.

Thank you very much.

Regards,
Jeffrey
Thu, Mar 17 2016 5:33 PMPermanent Link

Mario Enríquez

Open Consult


Hi Tim,

I too get the same error  Accowin mentions, but I only have 2 databases on the server and up to 10 simultaneous users.

This error pop ups a least once a week and the sure fire way to get rid of it is to restart the server, and every goes back to normal. But this a nasty solution and bother the users.

The application does some cross database database queries.

If we switch off the "Show Database Catalog Versions" what adverse consequences should we be aware of?

Regards,
Mario
Fri, Mar 18 2016 12:30 PMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Mario,

<< The application does some cross database database queries. >>

If you're doing cross-database queries using derived tables, then yes, this was the cause of the bug, which has been fixed in 2.22 B2:

http://www.elevatesoft.com/incident?action=viewaddr&category=edb&release=2.22&incident=4367

Tim Young
Elevate Software
www.elevatesoft.com
Fri, Mar 18 2016 5:09 PMPermanent Link

Mario Enríquez

Open Consult

Thank you very much Tim, I going to upgrade soon then.

Regards,
Mario
Image