databaseconfigurationquestdb

Warning: fs.file-max limit is too low [current=1000000, recommended=1048576], after changing ulimit already


I've been using QuestDB for a while (Ubuntu, XFS filesystem), with no issues. A few days ago I updated to 8.0.2 (also tested the latest release 8.1.0), and I got two warnings: One about the max virtual memory, and one about the max open files.

The warnings gave instructions to fix this. For virtual memory I changed vm.max_map_count=1048576 and the warning disappeared. But I also changed fs.file-max=1048576 and the warning is still there. It says Warning: fs.file-max limit is too low [current=1000000, recommended=1048576]

If I run ulimit -Hn or sysctl fs.file-max I see the setting is now 1048576 but the warning is still there. I restarted the QuestDB service and cannot get rid of it.

The database itself seems to be performing well, and I can actually see increased performance compared to 7.4.2, but the warning is annoying.

Any hints would be appreciated.


Solution

  • The problem was in systemd. I had to modify the file at ~/.config/systemd/user/questdb.service and add the property LimitNOFILE=1048576. After service restart my warning is gone.

    P.S. After speaking with the QuestDB core team on slack, they told me this warning was always there, but it was just in the logs on startup. Apparently I was lucky not to have issues because I didn't have a lot of partitions on my tables, or otherwise I could have hit limits and see the service crash or misbehave. They just added a section on the docs to explain this and also how to set up on Mac.