Subject Firebird 2.1 hangs, log says "Database: ThreadData::start() failed"
Author Daniel Albuschat

today our Firebird Server (version, super server on win32)
did not allow new connections and was EXTREMELY slow. Ultimately, I
had to restart the fbserver process.

When I had a look at the logs, I saw this entry numerous times
(about... 10.000 times in ~20 minutes):

RIKER (Server) Tue Apr 20 15:02:10 2010
Database: ThreadData::start() failed:
operating system directive _beginthreadex failed
unknown Win32 error 8

Win32 error 8 supposedly means "Out of Memory" according to this list on MSDN:

The server runs Windows 2008 Server 64 bit and has a total of 16 GB of
RAM installed, of which not even half is in use. The Firebird Server
process was using something like ~1.500 MB of it when it was still
"running" (or rather idling, since it had 0,00% CPU usage).

I did two unusual things today:

- First, I installed the trial version of Sinatica Monitor and fiddled
with it a bit and showed it to one of my collegues. I was working on
our live database at that time. The server hung just a few minutes
after I quit Sinatica again.
- Second, because we had severe performance issues in large parts of
our application and I located one reason for them, I updated a stored
procedure on the live database.
The firebird.log has this entry:

RIKER (Server) Tue Apr 20 14:18:15 2010
Modifying procedure SELECT_TASKS_AHEAD which is currently in use by
active user requests

The first "operating system directive _beginthreadex failed" error
message popped up at 14:45, that's 27 minutes later.

Is using the new Firebird monitoring mechanics known to cause problems
on high-traffic live databases?
Or is it more likely that the use of Sinatica had nothing to do with
this, but the update of the stored procedure was the sole cause of the

Any thoughts on this?

Kind regards,

Daniel Albuschat

eat(this); // delicious suicide