On Fri, Feb 5, 2010 at 03:17, Bruce Tiffany <[email protected]> wrote:
> We encountered an error in FB 2.1.0 and 2.5.1 in some web applications:

Is the application run under IIS?

> Similar errors were occurring too frequently from various Firebird

Does it mean you can simulate it consistently?

> Specifically, the line "this.ExecuteCommand(behavior,true);".  Because
> this line is enclosed within a try/catch block, the exception is
> handled.  However, this alters program flow to the catch block.  Inside

What's the IscException exactly?

> But I was able to finally figure it out.  I was able to reproduce the
> error in a multithreaded environment.  When I locked the code which

Can you show us the test case? Are you aware of, that the provider
*isn't* thread safe?

> called the DLL which uses Firebird, the error went away.  Without the
> lock, the error also did not occur when our SQL DLL (issuing Firebird
> queries) was called serially (sequential calls rather than parallel).

Was for these commands separate connection used? Or very careful
synchronization (if you understand the protocol internals).

> This gave me a hunch as to what the problem was.  I tried commenting out
> the "FbConnection.ClearAllPools()" statement, and voila!  End of error.

Where you commented it out?

> We had started clearing all pools a few years ago because we were seeing
> persistent connections on our servers, because the .NET Data Provider
> pools connections even after they are closed, so that they can be reused
> on the next call to the database.  The pooled connection stays "alive"
> on the server until the application is closed; unfortunately, since
> these were web applications, they were never truly closed.  So, when any

That's not true. You can specify the connection lifetime. And also -
assuming IIS - the process is ended to recycle worker proces.

-- 
Jiri {x2} Cincura (CTO x2develop.com)
http://blog.cincura.net/ | http://www.ID3renamer.com

------------------------------------------------------------------------------
Download Intel&#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Firebird-net-provider mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/firebird-net-provider

Reply via email to