Subject | Re: [firebird-support] HELP! Stored procedure with infinite loop killed the database |
---|---|
Author | Helen Borrie |
Post date | 2004-05-26T04:56:18Z |
At 03:32 AM 26/05/2004 +0000, you wrote:
and you crashed it to stop it, you'll have to reboot the machine to get rid
of it from memory.
If it had been Superserver, and you crashed it, the Guardian might have
tried to restart it. In that case, provided it did restart, you should
have been able to open a new "first connection". (That's why I think you
were running Embedded).
If it had been Classic, you wouldn't have got the exclusive lock message.
Whatever, it's extremely unlikely that you have a corrupted
database. Provide enough information about your setup to enable people to
offer suggestions that are not just wild guesses.
/heLen
>If anyone can help, that would be great.It sounds as if you were running the Embedded server. Since that is a DLL,
>
>I created a stored procedure that used a WHILE...DO loop and the
>first time I tried running it, the query never returned data and hung
>IBExpert. I had to kill the process in Windows XP.
>
>I suspect that the WHILE...DO loop was caught in an infinite loop. I
>read somewhere that Firebird doesn't have a timeout value for stored
>proc's.
>
>Anyway, ever since then I can't connect to the database -- it
>complained first of something like "exclusive lock permits further
>execution of commands" or something similar in IBExpert when I first
>tried to reconnect.
>
>Now IBExpert just hangs. Using GFIX returns with an "unavailable
>database" message.
>
>Any ideas how to recover the database? I'd seriously like to use
>Firebird in a production environment, but I'm a little cautious now.
>A silly (and pretty common scenario during unit testing) thing like
>an infinte loop in a stored proc has brought down my test server and
>I haven't been able to find any info on how to recover from it.
>
>Any help or suggestions would be greatly appreciated!
and you crashed it to stop it, you'll have to reboot the machine to get rid
of it from memory.
If it had been Superserver, and you crashed it, the Guardian might have
tried to restart it. In that case, provided it did restart, you should
have been able to open a new "first connection". (That's why I think you
were running Embedded).
If it had been Classic, you wouldn't have got the exclusive lock message.
Whatever, it's extremely unlikely that you have a corrupted
database. Provide enough information about your setup to enable people to
offer suggestions that are not just wild guesses.
/heLen