Subject Re: Can anyone help: Error reading data from the connection
Author nitaligavino
Hi Martijn:

That is what I thought. I only asked because I use a pool of
connections. So I start by calling isc_attach_database say 5 times
and fill a pool with the db handles. Then when threads are created
they acquire a free handle use it, e.g., isc_start_transaction,
isc_dsql_execute_immediate, isc_commit_transaction, and then release
the db handle back to the pool. At this point another thread may
acquire this db handle. Is this safe?

Thanks
Dan Crea

--- In ib-support@y..., "Martijn Tonies" <m.tonies@u...> wrote:
> Hi,
>
> > I posted this message late last Friday and did not get any
response,
> > so...can anyone help with the error "Error reading data from the
> > connection"?
> >
> > ISC_STATUS =
> > status_vector[0]1
> > status_vector[1]335544726
> > status_vector[2]0
> >
> > The interbase.log reports:
> > DCREA (Server) Tue Sep 17 17:28:50 2002
> > INET/inet_error: read errno = 10054
> >
> > I believe I have narrowed this error to one or both of following
> > calls:
> > isc_dsql_prepare
> > isc_dsql_allocate_statement
> >
> > This error seems to appear when I have multiple threads making
these
> > calls? Virtually, concurrently.
> >
> > To ask a "newbie" question: Are the isc_... calls thread safe?
> >
> > Also, is there any thread local storage being used under the
covers?
> > I ask because I've implemented a pool where each thread acquires
it's
> > db handle via a pool so the db handles are reused among threads.
Not
> > concurrently however, 1 thread 1 handle at any point in time.
>
> If you have different connections for different threads (one
connection
> per thread) - it should be threadsafe.
>
>
> With regards,
>
> Martijn Tonies
> InterBase Workbench - the developer tool for InterBase
> http://www.upscene.com
>
> Firebird Workbench - the developer tool for Firebird
> http://www.upscene.com
>
> Upscene Productions
> http://www.upscene.com
>
> "This is an object-oriented system.
> If we change anything, the users object."