Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Increase FD size by default #207

Open
portfolec opened this issue Jan 7, 2025 · 7 comments
Open

Increase FD size by default #207

portfolec opened this issue Jan 7, 2025 · 7 comments

Comments

@portfolec
Copy link

It should be compiled by default with increased size because 1024 isn’t enough for a big survival server with large map, a lot of active plugins and 200 online players!

Error: You MUST recompile PHP with a larger value of FD_SETSIZE. It is set to 1024, but you have descriptors numbered at least as high as 1038. --enable-fd-setsize=2048 is recommended, but you may want to set it to equal the maximum number of open files supported by your system, in order to avoid seeing this error again at a later date.

@portfolec
Copy link
Author

BTW: the server has no file leaks at all, it’s just phar files and level db files that must be opened for basic functionality

@jasonw4331
Copy link

The --enable-fd-setsize flag is not available cross platform and so is not reasonable to modify by default. On linux systems, the FD size limit is overridden anyway, so changing the compile time limit won't make much difference. You can resolve this issue on your linux system by increasing the ulimit -n value.

It should still be noted that hitting this limit is a very strong indicator that your server is leaking file handles instead of closing them and that the limit will not be hit under normal circumstances.

@portfolec
Copy link
Author

The --enable-fd-setsize flag is not available cross platform and so is not reasonable to modify by default. On linux systems, the FD size limit is overridden anyway, so changing the compile time limit won't make much difference. You can resolve this issue on your linux system by increasing the ulimit -n value.

It should still be noted that hitting this limit is a very strong indicator that your server is leaking file handles instead of closing them and that the limit will not be hit under normal circumstances.

I said there were no leaks. I debugged it and ONLY level db files were the main cause of the error. Servers with a big map and a lot of players suffer from this.

@dktapps
Copy link
Member

dktapps commented Jan 7, 2025

leveldb has file handle limits precisely to avoid running into this limit. Whatever issue you're having, it's not leveldb's fault.

@portfolec
Copy link
Author

leveldb has file handle limits precisely to avoid running into this limit. Whatever issue you're having, it's not leveldb's fault.

I have 3 dimension worlds

@dktapps
Copy link
Member

dktapps commented Jan 7, 2025

Your point being what exactly?

@BearIsSleepy
Copy link

@portfolec by any chance, are you loading every world in your server simultaneously?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants