Subject Re: [firebird-support] Completely unable to connect in 2.1.2
Author Helen Borrie
At 04:55 AM 10/06/2009, you wrote:
>Dear Firebird Users and Experts,
>
>I just upgraded from 1.5 on Fedora Linux to Firebird 2.1.2 (Classic)
>on a Red Hat EL5 server. The queries are *much* faster, thanks for
>all the work that must have gone into this. However I have a problem
>with the server hanging periodically and being completely unable to
>query the database.
>
>This last happened when I was using isql -- The application using the
>database had been zipping along fine all day. I mistyped a select
>query and rather than wait for all the output, I ctrl-Z'd the isql
>window back to the shell prompt. Then when I tried to start a new
>isql session, any query I submitted just hung there with no output or
>error. What was worse, the application which was using the same
>database was completely unable to execute any queries against the
>database.
>
>I tried to kill -TERM the isql session and it would not die. I 'kill
>-9''d it but rather than diss appearing, it became, 'defunct'. I
>stopped the application that used the database, tried 'killall -TERM
>fb_iniet_server", shutdown the firebird server (/etc/init.d/xinetd
>stop), restarted it, but still could not connect. In short, I had to
>re-boot the machine to get everything working again.
>
>Before rebooting, I noticed the the isc_lock1... file had expanded
>from its default of 1meg to 1.5meg. I am assuming that this is some
>kind of locking issue but have no idea how to fix it. It has happened
>in the past without me ctrl-Zing out of isql, so there is some lurking
>problem there.
>
>Has anyone seen this? Any ideas on how to fix this?

Get out of the habit of crashing out of isql. You'll leave your uncommitted transaction ...well .. uncommitted. Worse, if you used a direct connection to the database (as people often do in Classic on Linux) then you've left the database file locked with an exclusive file lock and no road back, since you have killed the embedded server instance that acquired that lock.

If you want to go into the shell temporarily from an isql session, use the SHELL command.

SQL> shell;

To return to your isql session, use 'exit'.

To end an isql session, use either QUIT or EXIT: quit rolls back the work in the current transaction before detaching; exit commits and detaches.

./hb