Firebird error “Operating system call _beginthreadex failed. Error code 8” can mean your server process ran out of memory
Posted by jpluimers on 2018/06/14
On a production system we had this error occurring without warning:
The cause was running out of private bytes or virtual size as they were almost 2 gigabyte which is too much for a 32-bit process:
The not so nice thing is that there were no memory warnings in the Firebird.log file at all.
In the client application the DAC (Data Access Layer) was getting lots of “unable to allocate memory from operating system” errors back from Firebird (and logging them in the client log file), so the client didn’t run out of memory: the server did.
This was with 2.5.2.26540 (at that time the most recent version) and it looks like more people suffer from this:
- [WayBack] [#CORE-2978] Operating system call _beginthreadex failed. Error code 8 … – Firebird RDBMS Issue Tracker
- [WayBack] firebird-devel – 32-bit Firebird attempting to create large amount of thread on 64-bit server
We put a monitor to watch the fbserver.exe process and warn us if it was reaching 1.5 gigabyte so we could re-start it before running out of memory.
–jeroen







thaddy said
Are you seriously using Firebird in a production environment? I consider that both a serious consultancy and a serious design mistake. We left it in the early 2000’s because of those memory problems.
jpluimers said
I am not. But some parties are.