Subject | Re: An existing connection was forcibly closed by the remote host (FB1.53/Win2003) |
---|---|
Author | Glebas |
Post date | 2006-03-28T05:05:53Z |
David,
Thanks, I don't think the problem is here - this is single-thread
environent and my client app is sending little check-in SQL query
every minute.
--- In firebird-support@yahoogroups.com, David Johnson
<johnson_d@...> wrote:
Thanks, I don't think the problem is here - this is single-thread
environent and my client app is sending little check-in SQL query
every minute.
--- In firebird-support@yahoogroups.com, David Johnson
<johnson_d@...> wrote:
>open but
> On Mon, 2006-03-27 at 14:01 +0000, Glebas wrote:
> > --- In firebird-support@yahoogroups.com, David Johnson
> > <johnson_d@> wrote:
> > >
> > > Sockets timeout on the server?
> > >
> > > If there is no activity, the OS will close the socket. An
> > > unused socket is a potential security hole.issue
> >
> > Ok, and how to fix that? :)
>
> Make sure that, even when there is no application activity, you
> regular keep-alive transactions on the connection. Say, onceevery 15
> minutes. To keep from sending spurious transactions, reset thetimer
> every time you issue a genuine transaction.the
>
> I am not sure if a simple {startTransaction ();commit();} would do
> trick, or if you would actually need to issue some sort of work -say
> select the current timestamp or a generator value or something.thread,
>
> In a multi-threaded app, where the connection runs in its own
> wake every connection thread up and have the thread mainline codesmart
> enough to recognize that when there is no pending transaction froma
> user it still needs to run the keep-alive transaction.(depending on
>
> In a single threaded app, set up an OS or JVM level timer
> your environment - Delphi TTimer is an OS timer) so whenever itfires it
> invokes the dummy transaction on the connections. Set up asemaphore to
> protect the connection so that only the timer or the applicationmay
> actually try to run a transaction at any time. Reset the timerafter
> every successful or failed request.
>