• Halloween is coming! To celebrate the occasion, we dusted off a couple of old skins, and even created a brand new one (Pixel).
    To get into the festive spirit, install the Skins extension.
  • The new Python extension is now available. It allows customers to deploy and manage WSGI-based Python applications on their websites directly from Plesk.
  • The Plesk Mobile apps for iOS and Android and the Plesk Mobile Center extension have been deprecated, and are no longer available for new installations. In Plesk Obsidian 18.0.84, the Plesk Mobile Center extension will be removed from servers during the upgrade, and the Plesk Mobile apps will lose their server management features.
  • The Social Login extension has been deprecated and will be removed in Plesk Obsidian 18.0.84. After that, it will no longer be possible to log in to Plesk with a Google, Facebook, GitHub account, or with a passkey. Plesk usernames and passwords, as well as logging in with a WebPros Account, are not affected.

Question Number of files open for a regular server?

tkalfaoglu

Silver Pleskian
Server operating system version
AlmaLinux
Plesk version and microupdate number
Obsidian
Hi.. A server had been having over 50k open files recently. I wrote a small code that checks it and warns me if it's over 50k, so I got some emails like that.
This is the server that crashed a few times from too many open files (not crashed, but apps couldn't open new files) in the past.

I checked it, and it's currently much less:
# cat /proc/sys/fs/file-nr
25312 0 2000000

but what is the "normal" open files for a server with ~250 hostings?
Many thanks, -t
 
Rule of thumb: 90 files per domain. But it strongly depends on what is done on the server and what these domains are. By a typical ratio of 3 domains per user where 2 domains are redirects and 1 is a website.

However, this is only a typical value. Nothing speaks against setting a high number of allowed file handles, like 100,000 for your installation. You always need a lush headroom, because you never know in advance what users will be up to.
 
Many thanks Peter, in that case my 22k files is correct. No idea why it went up to 50k some time in the night. Maybe the backup processes or something.. Regards, -turgut
 
Maybe the backup processes or something..
Might be. The files are just opened and closed sequentially during the backup, but if your users have lots of databases and tables, the sql server will try to keep them open, and those can be several thousand, depending on how you tuned mysqld.
 
Does anyone have a recommended limits.conf file they could share? I think I made mine too generous, and one runaway process can take the server down..
Thanks!
-t
 
Back
Top