Subject | Re: multithreaded app having trouble connecting |
---|---|
Author | Nicholas Cain |
Post date | 2005-02-20T17:18:57Z |
--- In firebird-support@yahoogroups.com, "Ann W. Harrison"
<aharrison@i...> wrote:
although I'm not sure it has made much difference yet. However,
preventing the repeated connections and leaving just transactions
sounds a good idea. I'll have a go and see where it gets me...
thanks,
nik
<aharrison@i...> wrote:
> Nik wrote:firebird
> >
> >
> >
> > I have an application that creates 50 threads, and then every 5
> > seconds all the threads attach and insert some data into a
> > Super Server 1.5 database (this is currently using the firebirdC++
> > api rather than things like ibpp etc).could
>
> Ouch. In Firebird 1.5, connections are heavier-weight than they
> be. Could you leave the connections in place and just start & stopconnection
> transactions? Transactions are much lighter weight. Each
> has a separate copy of that part of the metadata that it uses. Ifyou
> kept the connection you'd not only keep the metadata, you mightalso be
> able to keep the prepared insert statement...I've found the linux connection limit in xinetd (thanks to Adam),
> >
> >
> > Occasionally a thread will throw up;
> >
> > Unable to complete network request to host "127.0.0.1".
> > -Failed to establish a connection.
> > -Connection refused
>
> One possibility is that your Linux is configured (as many are by
> default) to limit the number of simultaneous connections.
>
> Regards,
>
>
> Ann
although I'm not sure it has made much difference yet. However,
preventing the repeated connections and leaving just transactions
sounds a good idea. I'll have a go and see where it gets me...
thanks,
nik