Subject Loosing connection to firebird after a while.
Author gabrielsenkim
Hi,
i'm stress testing firebird to see if it's apporpriate to serve as a
datastore in a heavily threaded application.

I've written my own threaded simulator and run it against FB.

The simulator basically starts a lot of threads and each thread sleeps
for a short period and then insert a simle row in a table. They do so
continually until i stop the program.

Os so it should be, but after a while the program looses connection to
the base throwing this error message:
----

Engine Code : 335544721
Engine Message :
Unable to complete network request to host "localhost".
Failed to establish a connection.
Only one usage of each socket address (protocol/network address/port)
is normally permitted

Engine Code : 335544721

---

and the appliccation hangs.

my first assumtion was due to thread issues, so i enclosed the insert
stuff in a critical section to see if it solved the problem. It didn't.

The strange thing is that the number of rows in the table is almost
always the same: 3946 +/- 5.

When the phenomenon appears i'm unable to connect to the databse using
FlameRobin. It gives me the same error message. If i wait for a minute
or so i'm able to connect indicating that some ressources have been
released. Each thread opens and closes a connection to the database
when it inserts a row. No connection pooling is involved.

I'm using c++ and IBPP but before going into discussions about my code
in another forum i'll like to know if there are any parameters in Fb
that i can change to see if it solves my problem.

I see this behaviour in classic as well as superserver.

i create the database with the following parameters:

Disconnected call
Sync Writes is enabled (Safety).
Use 'speed' command-line argument to test the other mode.
ODS Major 11
ODS Minor 1
Page Size 8192
Pages 148
Buffers 20480
Sweep 5000
Reserve true

i'm using windows.

Hope to get some feedback.

thanks

Kim Gabrielsen