macOS — Firebird 5.0.1.1469 — Too many open Files #8345
-
Posting this here so that other people who have that problem can find the solution because it really wasn't easy to find that the problem was with I have the following error: $ isql
SQL> CONNECT /Users/paul/STTDB3. FDB5;
Statement failed, SQLSTATE = 08001
I/0 error during "open" operation for file "/tmp/firebird/fb_tpc_0d000001ba2560600000000_8736"'
-Error while trying to open file
-Too many open files And in JetBrains PyCharm and DataGrip I have this error:
My configuration:
|
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 7 replies
-
Solution ✅How to fix the Firebird server service: echo 'limit openfiles 65535' | sudo tee -a /etc/csh.login How to fix echo 'ulimit -n 65535' | sudo tee -a /etc/profile
echo 'ulimit -n 65535' | sudo tee -a /etc/zprofile This should be enough. But if it still doesn't work you can attempt to run these in addition: sudo launchctl limit maxfiles 65535 unlimited
sudo sysctl -w kern.maxfiles=245760
sudo sysctl -w kern.maxfilesperproc=122880 If these 3 last commands fixed it you will need to run them at boot to persist them. You can create two launch daemon files for that:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>limit.maxfiles</string>
<key>ProgramArguments</key>
<array>
<string>/bin/launchctl</string>
<string>limit</string>
<string>maxfiles</string>
<string>65535</string>
<string>unlimited</string>
</array>
<key>RunAtLoad</key>
<true/>
</dict>
</plist> and
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>kern.maxfiles</string>
<key>ProgramArguments</key>
<array>
<string>/usr/sbin/sysctl</string>
<string>-w</string>
<string>kern.maxfiles=245760</string>
<string>kern.maxfilesperproc=122880</string>
</array>
<key>RunAtLoad</key>
<true/>
</dict>
</plist> |
Beta Was this translation helpful? Give feedback.
-
@mrotteveel Is it not considered a bug? I only have a single (admittedly big) database. I don't know why Firebird attempts to open so many files (caching maybe?) but shouldn't it restrict itself to the maximum allowed in the environment? |
Beta Was this translation helpful? Give feedback.
-
On 12/9/24 15:07, Paul wrote:
@mrotteveel <https://github.com/mrotteveel> Good point!
Will be interesting to know - what particular files are opened?
|
Beta Was this translation helpful? Give feedback.
Solution ✅
How to fix the Firebird server service:
How to fix
isql
:This should be enough. But if it still doesn't work you can attempt to run these in addition:
If these 3 last commands fixed it you will need to run them at boot to persist them. You can create two launch daemon files for that:
/Library/LaunchDaemons/limit.maxfiles.plist
: