flamerobin icon indicating copy to clipboard operation
flamerobin copied to clipboard

Flamerobin 0.9.14 long wait for connection to the database to complete

Open livius2 opened this issue 6 months ago • 20 comments

Hi,

I've probably upgraded from version 0.9.12, and now FlameRobin takes a long time during the final “Complete” step.

It fetches all the information quickly, but at the “Complete” step it hangs for about one minute.

Image

livius2 avatar Jun 09 '25 06:06 livius2

If you go back to 0.9.12, it works fine? Is this a local or remote database, and can you inform approximately how many objects (users, tables, SPs, views, functions....) this database have?

arvanus avatar Jun 09 '25 10:06 arvanus

Image

livius2 avatar Jun 10 '25 10:06 livius2

I went back even to 9.9 and it still wait long. So probably something else causing this. And yes, database is remote. Interesting that it take full CPU core at this "Compleate" step.

Image

livius2 avatar Jun 10 '25 10:06 livius2

Hello ! @livius2 , are you recently changed the version of your firebird (the service) ? 🧐

baldeuniversel avatar Jun 10 '25 10:06 baldeuniversel

@baldeuniversel No, it is the same for years, quite old, but as is stable on production so not changed.

WI-V3.0.5.33187 Firebird 3.0

livius2 avatar Jun 10 '25 11:06 livius2

@livius2 ! Perhaps, a simulation on the virtual machine can give responses (I recommend you to use the new version of the firebird as tests) 🤔 .

baldeuniversel avatar Jun 10 '25 12:06 baldeuniversel

@baldeuniversel I tested with Firebird 5 and recent fbclient on the same machine and got the same result.

What exactly happens in the “complete” state? Understanding this might shed some light on the issue and help me identify the cause.

All steps prior to the “complete” message run very quickly. Thx.

livius2 avatar Jun 11 '25 06:06 livius2

@livius2 , what's the version of your operating system (I assume your OS is Windows) ?

baldeuniversel avatar Jun 11 '25 06:06 baldeuniversel

@livius2, several possible hypotheses 🤔.

Could you do the test on a smaller database?

baldeuniversel avatar Jun 11 '25 06:06 baldeuniversel

Same example database opening delay (12 seconds) FlameRobin 0.9.14, Windows 10 Pro, Firebird 4

Image

jobrvfp avatar Jun 11 '25 07:06 jobrvfp

@baldeuniversel I’m using Windows 11 Pro. I tested on a fresh database, and the operation finished instantly. After creating 500 tables, the process now pauses for six seconds at the “complete” state. Each table is created in exactly the same way:

CREATE TABLE TAB_1
(
  FIELD_1 VARCHAR(20),
  FIELD_2 VARCHAR(20),
  FIELD_3 VARCHAR(20),
  FIELD_4 VARCHAR(20),
  FIELD_5 VARCHAR(20),
  FIELD_6 VARCHAR(20),
  FIELD_7 VARCHAR(20),
  FIELD_8 VARCHAR(20),
  FIELD_9 VARCHAR(20),
  FIELD_10 VARCHAR(20),
  FIELD_11 VARCHAR(20),
  FIELD_12 VARCHAR(20),
  FIELD_13 VARCHAR(20),
  FIELD_14 VARCHAR(20),
  FIELD_15 VARCHAR(20),
  FIELD_16 VARCHAR(20),
  FIELD_17 VARCHAR(20),
  FIELD_18 VARCHAR(20),
  FIELD_19 VARCHAR(20),
  FIELD_20 VARCHAR(20),
  FIELD_21 VARCHAR(20),
  FIELD_22 VARCHAR(20),
  FIELD_23 VARCHAR(20),
  FIELD_24 VARCHAR(20),
  FIELD_25 VARCHAR(20),
  FIELD_26 VARCHAR(20),
  FIELD_27 VARCHAR(20),
  FIELD_28 VARCHAR(20),
  FIELD_29 VARCHAR(20)
);

livius2 avatar Jun 11 '25 09:06 livius2

@livius2. Yeah ! I see 🤔. One of the solutions could be to load a set of resources in a deferred way (if it's not already the case). I will try to implement a solution that goes in this direction. You can test it by downloading the build version for Windows via the workflow (git action). If it works well, it could be adopted.

baldeuniversel avatar Jun 12 '25 04:06 baldeuniversel

@baldeuniversel did you were able to reproduce the problem @livius2 have? created a sample database in a remote server, and got no delay

set term ` ;
execute block 
as
declare variable i integer;
BEGIN
  i =1;
  while (i<=500) do
  BEGIN
    execute statement 'CREATE TABLE TAB_'||i||' 
(
  FIELD_1 VARCHAR(20),
  FIELD_2 VARCHAR(20),
  FIELD_3 VARCHAR(20),
  FIELD_4 VARCHAR(20),
  FIELD_5 VARCHAR(20),
  FIELD_6 VARCHAR(20),
  FIELD_7 VARCHAR(20),
  FIELD_8 VARCHAR(20),
  FIELD_9 VARCHAR(20),
  FIELD_10 VARCHAR(20),
  FIELD_11 VARCHAR(20),
  FIELD_12 VARCHAR(20),
  FIELD_13 VARCHAR(20),
  FIELD_14 VARCHAR(20),
  FIELD_15 VARCHAR(20),
  FIELD_16 VARCHAR(20),
  FIELD_17 VARCHAR(20),
  FIELD_18 VARCHAR(20),
  FIELD_19 VARCHAR(20),
  FIELD_20 VARCHAR(20),
  FIELD_21 VARCHAR(20),
  FIELD_22 VARCHAR(20),
  FIELD_23 VARCHAR(20),
  FIELD_24 VARCHAR(20),
  FIELD_25 VARCHAR(20),
  FIELD_26 VARCHAR(20),
  FIELD_27 VARCHAR(20),
  FIELD_28 VARCHAR(20),
  FIELD_29 VARCHAR(20)
);';
    i=i+1;
  end
end`
set term ; `

But to be fair, in this remote database from the print I got 2 seconds delay

Image

arvanus avatar Jun 12 '25 11:06 arvanus

Flamerobin had a related problem some time ago: https://github.com/mariuz/flamerobin/issues/138 https://github.com/mariuz/flamerobin/issues/181 https://github.com/mariuz/flamerobin/pull/139

Could you try the previous version just to be 100% sure its not related?

arvanus avatar Jun 12 '25 11:06 arvanus

@arvanus which exact tag to try?

livius2 avatar Jun 12 '25 16:06 livius2

Try this: https://github.com/mariuz/flamerobin/releases/tag/0.9.3.6

and this: https://github.com/mariuz/flamerobin/releases/tag/0.9.3.11 (yes, they are very old, just to know if the bug is related or not)

arvanus avatar Jun 12 '25 19:06 arvanus

@baldeuniversel did you were able to reproduce the problem @livius2 have? created a sample database in a remote server, and got no delay

set term ` ;
execute block 
as
declare variable i integer;
BEGIN
  i =1;
  while (i<=500) do
  BEGIN
    execute statement 'CREATE TABLE TAB_'||i||' 
(
  FIELD_1 VARCHAR(20),
  FIELD_2 VARCHAR(20),
  FIELD_3 VARCHAR(20),
  FIELD_4 VARCHAR(20),
  FIELD_5 VARCHAR(20),
  FIELD_6 VARCHAR(20),
  FIELD_7 VARCHAR(20),
  FIELD_8 VARCHAR(20),
  FIELD_9 VARCHAR(20),
  FIELD_10 VARCHAR(20),
  FIELD_11 VARCHAR(20),
  FIELD_12 VARCHAR(20),
  FIELD_13 VARCHAR(20),
  FIELD_14 VARCHAR(20),
  FIELD_15 VARCHAR(20),
  FIELD_16 VARCHAR(20),
  FIELD_17 VARCHAR(20),
  FIELD_18 VARCHAR(20),
  FIELD_19 VARCHAR(20),
  FIELD_20 VARCHAR(20),
  FIELD_21 VARCHAR(20),
  FIELD_22 VARCHAR(20),
  FIELD_23 VARCHAR(20),
  FIELD_24 VARCHAR(20),
  FIELD_25 VARCHAR(20),
  FIELD_26 VARCHAR(20),
  FIELD_27 VARCHAR(20),
  FIELD_28 VARCHAR(20),
  FIELD_29 VARCHAR(20)
);';
    i=i+1;
  end
end`
set term ; `

But to be fair, in this remote database from the print I got 2 seconds delay

Image


Nice loop, but we shouldn't exaggerate too much on the stopping condition 🙂.

I did the test, the connection is almost instantaneous (about max one (1) second).

Host operating system (distribution) :

lsb_release -a
No LSB modules are available.
Distributor ID:	Ubuntu
Description:	Ubuntu 24.04.2 LTS
Release:	24.04
Codename:	noble

Other relevant information :

  • firebird version : 5.0.2
  • flamerobin version : 0.9.14
  • wxWidgets library version : 3.2.4

Image

baldeuniversel avatar Jun 12 '25 21:06 baldeuniversel

Try this: https://github.com/mariuz/flamerobin/releases/tag/0.9.3.6

and this: https://github.com/mariuz/flamerobin/releases/tag/0.9.3.11 (yes, they are very old, just to know if the bug is related or not)

on 0.9.3.6 time 13 seconds on "complete" on 0.9.3.11 time 15 seconds on "complete on 0.9.14 time 46 seconds on "complete

Image

livius2 avatar Jun 16 '25 17:06 livius2

Try this: https://github.com/mariuz/flamerobin/releases/tag/0.9.3.6 and this: https://github.com/mariuz/flamerobin/releases/tag/0.9.3.11 (yes, they are very old, just to know if the bug is related or not)

on 0.9.3.6 time 13 seconds on "complete" on 0.9.3.11 time 15 seconds on "complete on 0.9.14 time 46 seconds on "complete

Image

I'll try it via a Windows operating system 🤔.

baldeuniversel avatar Jun 17 '25 11:06 baldeuniversel

Any suggestions on what to check would be appreciated. Even a description of what's happening at the "complete" stage; maybe I'll think of something that might be affecting it.

livius2 avatar Jul 31 '25 07:07 livius2