Subject | Some doubts about database shutdown and client disconnection |
---|---|
Author | stefan_ssssmart |
Post date | 2010-02-24T11:22:15Z |
When I connect by isql to a SS 2.0.5 database, and then force a shutdown
of this database, the connection is still shown as established on Linux:
pserver:~ # /opt/firebird_20/bin/isql -user sysdba -pass masterkey
localhost/gds_fb20:/home/firebird/20/sssins.gdb
Database: localhost/gds_fb20:/home/firebird/20/sssins.gdb, User: sysdba
SQL> shell;
pserver:~ # netstat -n -p --inet
Active Internet connections (w/o servers)
Proto Recv-Q Send-Q Local Address Foreign Address
State PID/Program name
tcp 0 0 127.0.0.1:39841 127.0.0.1:3050
ESTABLISHED 4876/isql
tcp 0 0 127.0.0.1:3050 127.0.0.1:39841
ESTABLISHED 3345/fbserver
pserver:~ # /opt/firebird_20/bin/gfix -shut -force 0 -user sysdba
-passmasterkey localhost/gds_fb20:/home/firebird/20/sssins.gdb
pserver:~ # netstat -n -p --inet
Active Internet connections (w/o servers)
Proto Recv-Q Send-Q Local Address Foreign Address
State PID/Program name
tcp 0 0 127.0.0.1:39842 127.0.0.1:3050
TIME_WAIT -
tcp 0 0 127.0.0.1:39841 127.0.0.1:3050
ESTABLISHED 4876/isql
tcp 0 0 127.0.0.1:3050 127.0.0.1:39841
ESTABLISHED 3345/fbserver
(...wait 5 minutes...)
pserver:~ # netstat -n -p --inet
Active Internet connections (w/o servers)
Proto Recv-Q Send-Q Local Address Foreign Address
State PID/Program name
tcp 0 0 127.0.0.1:39841 127.0.0.1:3050
ESTABLISHED 4876/isql
tcp 0 0 127.0.0.1:3050 127.0.0.1:39841
ESTABLISHED 3345/fbserver
pserver:~ # exit
exit
SQL> exit;
Statement failed, SQLCODE = -902
database /home/firebird/20/sssins.gdb shutdown
Statement failed, SQLCODE = -902
database /home/firebird/20/sssins.gdb shutdown
pserver:~ #
Shouldn't the connection be closed after a database shutdown on
SuperServer?
Some more doubts:
Is it necessary, on a server with various Firebird servers listening to
different ports,
use the fully qualified path to the database (localhost/gds_fb20:...)
when calling gfix?
And finally: When forcing a shutdown of a database on a ClassicServer
installation (v2.1.3),
all already established connections keep working without problems.
Shouldn't this behaviour be documented in the user manual
'Firebird'sgfix Database Housekeeping tool', section 'Database Startup
andShutdown'?
There is written that 'No new connections or
transactions are permitted and any active sessions are terminated along
with any active transactions'
without telling that the second half only applies to SuperServer.
Well, I just read this section when making my tests, perhaps it is
documented on another page?
Thanks,
Stefan
[Non-text portions of this message have been removed]
of this database, the connection is still shown as established on Linux:
pserver:~ # /opt/firebird_20/bin/isql -user sysdba -pass masterkey
localhost/gds_fb20:/home/firebird/20/sssins.gdb
Database: localhost/gds_fb20:/home/firebird/20/sssins.gdb, User: sysdba
SQL> shell;
pserver:~ # netstat -n -p --inet
Active Internet connections (w/o servers)
Proto Recv-Q Send-Q Local Address Foreign Address
State PID/Program name
tcp 0 0 127.0.0.1:39841 127.0.0.1:3050
ESTABLISHED 4876/isql
tcp 0 0 127.0.0.1:3050 127.0.0.1:39841
ESTABLISHED 3345/fbserver
pserver:~ # /opt/firebird_20/bin/gfix -shut -force 0 -user sysdba
-passmasterkey localhost/gds_fb20:/home/firebird/20/sssins.gdb
pserver:~ # netstat -n -p --inet
Active Internet connections (w/o servers)
Proto Recv-Q Send-Q Local Address Foreign Address
State PID/Program name
tcp 0 0 127.0.0.1:39842 127.0.0.1:3050
TIME_WAIT -
tcp 0 0 127.0.0.1:39841 127.0.0.1:3050
ESTABLISHED 4876/isql
tcp 0 0 127.0.0.1:3050 127.0.0.1:39841
ESTABLISHED 3345/fbserver
(...wait 5 minutes...)
pserver:~ # netstat -n -p --inet
Active Internet connections (w/o servers)
Proto Recv-Q Send-Q Local Address Foreign Address
State PID/Program name
tcp 0 0 127.0.0.1:39841 127.0.0.1:3050
ESTABLISHED 4876/isql
tcp 0 0 127.0.0.1:3050 127.0.0.1:39841
ESTABLISHED 3345/fbserver
pserver:~ # exit
exit
SQL> exit;
Statement failed, SQLCODE = -902
database /home/firebird/20/sssins.gdb shutdown
Statement failed, SQLCODE = -902
database /home/firebird/20/sssins.gdb shutdown
pserver:~ #
Shouldn't the connection be closed after a database shutdown on
SuperServer?
Some more doubts:
Is it necessary, on a server with various Firebird servers listening to
different ports,
use the fully qualified path to the database (localhost/gds_fb20:...)
when calling gfix?
And finally: When forcing a shutdown of a database on a ClassicServer
installation (v2.1.3),
all already established connections keep working without problems.
Shouldn't this behaviour be documented in the user manual
'Firebird'sgfix Database Housekeeping tool', section 'Database Startup
andShutdown'?
There is written that 'No new connections or
transactions are permitted and any active sessions are terminated along
with any active transactions'
without telling that the second half only applies to SuperServer.
Well, I just read this section when making my tests, perhaps it is
documented on another page?
Thanks,
Stefan
[Non-text portions of this message have been removed]