Author Topic: too many open files on Fedora server  (Read 337 times)

Offline boxyball

  • Full Member
  • ***
  • Posts: 90
too many open files on Fedora server
« on: March 02, 2020, 03:20:32 PM »
My Fedora 30 roundcube server with only about 100 users, only a few of which are using it at any given time, has 55k open files, most of which are apache.
Another email server using older Fedora with older webmail has only 8k open files, which is what I'm used to seeing.
I would like to use roundcube for higher-use servers but I have a feeling the number of open files will be insane.
If I do the math, 55k breaks down to 550 open files per user.  I would like to migrate a server with 1700 users.  If I multiply 550 x 1700 I get close to a million open files!
How can I reduce the amount of files apache has open for roundcube (the only web application on the server)?
I am using all of the apache defaults and I have no experience with MPM or any other apache optimizations, so none of those are being used.
I have searched the Internet and all I find is advice on how to increase the open file limit, which I do not want to do and should not have to.
Below is an extract from lsof results.
152 apache processes are running for every process ID.
The same 152 processes are repeated 278 times, each with a different process ID, but all are under the apache main process.
Thanks in advance.

lsof reports the following apache processes repeated over and over:
/
/
/usr/sbin/httpd
/usr/lib64/libnss_systemd.so.2
/usr/lib64/libnss_files-2.29.so
/var/lib/sss/mc/initgroups
/dev/zero
/dev/zero
/var/lib/sss/mc/group
/var/lib/sss/mc/passwd
/usr/lib64/libnss_sss.so.2
/usr/lib64/httpd/modules/mod_proxy_http2.so
/usr/lib64/libnghttp2.so.14.18.0
/usr/lib64/httpd/modules/mod_http2.so
/usr/lib64/httpd/modules/mod_cgid.so
/usr/lib64/libcrypto.so.1.1.1c
/usr/lib64/libssl.so.1.1.1c
/usr/lib64/httpd/modules/mod_systemd.so
/usr/lib64/httpd/modules/mod_ssl.so
/usr/lib64/httpd/modules/mod_proxy_wstunnel.so
/usr/lib64/httpd/modules/mod_proxy_uwsgi.so
/usr/lib64/httpd/modules/mod_proxy_scgi.so
/usr/lib64/httpd/modules/mod_proxy_hcheck.so
/usr/lib64/httpd/modules/mod_proxy_http.so
/usr/lib64/httpd/modules/mod_proxy_ftp.so
/usr/lib64/httpd/modules/mod_proxy_fdpass.so
/usr/lib64/httpd/modules/mod_proxy_fcgi.so
/usr/lib64/httpd/modules/mod_proxy_express.so
/usr/lib64/httpd/modules/mod_proxy_connect.so
/usr/lib64/httpd/modules/mod_proxy_balancer.so
/usr/lib64/httpd/modules/mod_proxy_ajp.so
/usr/lib64/httpd/modules/mod_lbmethod_heartbeat.so
/usr/lib64/httpd/modules/mod_lbmethod_bytraffic.so
/usr/lib64/httpd/modules/mod_lbmethod_byrequests.so
/usr/lib64/httpd/modules/mod_proxy.so
/usr/lib64/httpd/modules/mod_mpm_event.so
/usr/lib64/liblua-5.3.so
/usr/lib64/httpd/modules/mod_lbmethod_bybusyness.so
/usr/lib64/httpd/modules/mod_lua.so
/usr/lib64/httpd/modules/mod_dav_lock.so
/usr/lib64/httpd/modules/mod_dav_fs.so
/usr/lib64/httpd/modules/mod_dav.so
/usr/lib64/httpd/modules/mod_watchdog.so
/usr/lib64/httpd/modules/mod_vhost_alias.so
/usr/lib64/httpd/modules/mod_version.so
/usr/lib64/httpd/modules/mod_userdir.so
/usr/lib64/httpd/modules/mod_unixd.so
/usr/lib64/httpd/modules/mod_unique_id.so
/usr/lib64/httpd/modules/mod_suexec.so
/usr/lib64/httpd/modules/mod_substitute.so
/usr/lib64/httpd/modules/mod_status.so
/usr/lib64/httpd/modules/mod_socache_shmcb.so
/usr/lib64/httpd/modules/mod_socache_redis.so
/usr/lib64/httpd/modules/mod_socache_memcache.so
/usr/lib64/httpd/modules/mod_socache_dbm.so
/usr/lib64/httpd/modules/mod_slotmem_shm.so
/usr/lib64/httpd/modules/mod_slotmem_plain.so
/usr/lib64/httpd/modules/mod_setenvif.so
/usr/lib64/httpd/modules/mod_rewrite.so
/usr/lib64/httpd/modules/mod_request.so
/usr/lib64/httpd/modules/mod_reqtimeout.so
/usr/lib64/httpd/modules/mod_remoteip.so
/usr/lib64/httpd/modules/mod_negotiation.so
/usr/lib64/httpd/modules/mod_mime.so
/usr/lib64/httpd/modules/mod_mime_magic.so
/usr/lib64/httpd/modules/mod_macro.so
/usr/lib64/httpd/modules/mod_logio.so
/usr/lib64/httpd/modules/mod_log_config.so
/usr/lib64/httpd/modules/mod_info.so
/usr/lib64/httpd/modules/mod_include.so
/usr/lib64/httpd/modules/mod_headers.so
/usr/lib64/httpd/modules/mod_filter.so
/usr/lib64/httpd/modules/mod_ext_filter.so
/usr/lib64/httpd/modules/mod_expires.so
/usr/lib64/httpd/modules/mod_env.so
/usr/lib64/httpd/modules/mod_echo.so
/usr/lib64/httpd/modules/mod_dumpio.so
/usr/lib64/libz.so.1.2.11
/usr/lib64/httpd/modules/mod_dir.so
/usr/lib64/httpd/modules/mod_deflate.so
/usr/lib64/httpd/modules/mod_dbd.so
/usr/lib64/httpd/modules/mod_cache_socache.so
/usr/lib64/httpd/modules/mod_cache_disk.so
/usr/lib64/httpd/modules/mod_cache.so
/usr/lib64/libbrotlicommon.so.1.0.7
/usr/lib64/libm-2.29.so
/usr/lib64/libbrotlienc.so.1.0.7
/usr/lib64/httpd/modules/mod_data.so
/usr/lib64/httpd/modules/mod_brotli.so
/usr/lib64/httpd/modules/mod_autoindex.so
/usr/lib64/httpd/modules/mod_authz_user.so
/usr/lib64/httpd/modules/mod_authz_owner.so
/usr/lib64/httpd/modules/mod_authz_host.so
/usr/lib64/httpd/modules/mod_authz_groupfile.so
/usr/lib64/httpd/modules/mod_authz_dbm.so
/usr/lib64/httpd/modules/mod_authz_dbd.so
/usr/lib64/httpd/modules/mod_authz_core.so
/usr/lib64/httpd/modules/mod_authn_socache.so
/usr/lib64/httpd/modules/mod_authn_file.so
/usr/lib64/httpd/modules/mod_authn_dbm.so
/usr/lib64/httpd/modules/mod_authn_dbd.so
/usr/lib64/httpd/modules/mod_authn_core.so
/usr/lib64/httpd/modules/mod_authn_anon.so
/usr/lib64/httpd/modules/mod_auth_digest.so
/usr/lib64/httpd/modules/mod_auth_basic.so
/usr/lib64/httpd/modules/mod_allowmethods.so
/usr/lib64/httpd/modules/mod_alias.so
/usr/lib64/httpd/modules/mod_actions.so
/usr/lib64/libgpg-error.so.0.25.0
/usr/lib64/libuuid.so.1.3.0
/usr/lib64/libgcc_s-9-20190827.so.1
/usr/lib64/libgcrypt.so.20.2.5
/usr/lib64/liblz4.so.1.9.1
/usr/lib64/liblzma.so.5.2.4
/usr/lib64/librt-2.29.so
/usr/lib64/libpcre2-8.so.0.8.0
/usr/lib64/libc-2.29.so
/usr/lib64/libdl-2.29.so
/usr/lib64/libpthread-2.29.so
/usr/lib64/libapr-1.so.0.6.5
/usr/lib64/libexpat.so.1.6.9
/usr/lib64/libcrypt.so.2.0.0
/usr/lib64/libaprutil-1.so.0.6.1
/usr/lib64/libsystemd.so.0.25.0
/usr/lib64/libselinux.so.1
/usr/lib64/libpcre.so.1.2.11
/dev/zero
/usr/lib64/httpd/modules/mod_access_compat.so
/usr/lib64/ld-2.29.so
/dev/zero
/dev/null
type=STREAM
/var/log/httpd/error_log
protocol: TCP
*:http (LISTEN)
/var/lib/sss/mc/passwd
/var/lib/sss/mc/group
protocol: TCP
*:https (LISTEN)
pipe
pipe
/var/log/httpd/ssl_error_log
/var/log/httpd/access_log
/var/log/httpd/ssl_access_log
/var/log/httpd/ssl_request_log
/var/log/httpd/ssl_access_log
/var/log/httpd/ssl_request_log
type=DGRAM
/var/lib/sss/mc/initgroups
protocol: TCP
[eventpoll]
pipe
pipe
« Last Edit: March 02, 2020, 03:36:36 PM by boxyball »

Offline SKaero

  • Administrator
  • Hero Member
  • *****
  • Posts: 5,600
    • http://SKaero.com/
Re: too many open files on Fedora server
« Reply #1 on: March 02, 2020, 06:39:48 PM »
If your not using the Apache modules, comment them out in the config and they shouldn't be loaded on every request. In addition you may consider using Nginx which is far lighter for static resources.

Offline boxyball

  • Full Member
  • ***
  • Posts: 90
Re: too many open files on Fedora server
« Reply #2 on: March 02, 2020, 07:36:30 PM »
Thanks.
Does roundcube need any of the modules?

Offline SKaero

  • Administrator
  • Hero Member
  • *****
  • Posts: 5,600
    • http://SKaero.com/
Re: too many open files on Fedora server
« Reply #3 on: March 03, 2020, 10:45:18 AM »
I don't think it does other than what is being used for your configuration, IE php support, ssl, etc.

Offline Kinoshita

  • Newbie
  • *
  • Posts: 1
Re: too many open files on Fedora server
« Reply #4 on: March 07, 2020, 09:55:55 AM »
How do you check what modules are being used for roundcube exactly?