Total number of mounts: 28169

Discussion in 'Installation/Configuration' started by Steffan, Jun 9, 2020.

  1. Steffan

    Steffan Member


    Ispconfig is creating a lot of mount points for the /log of the website.
    I read an old post that this is for ssh access.
    Im not offering SSH to my clients.
    Is there a way to prevent these mountpoints?
    Any plans of making it optional in a new release?
    a lot of mount points decreased the spead on a (vps) restart if nessesary
  2. nhybgtvfr

    nhybgtvfr Well-Known Member HowtoForge Supporter

    it's not just for ssh access, it also allows ftp users to retrieve access/error logs as well.

    that said, you do have a large number of mounts for one server, you don't maybe have an another drive/partition/mount also bind mounting to /var/www do you? that would immediately double the number of bind mounts created.

    just out of interest, how many vhosts do you have on that server? and what amount of cpu/ram?
    Th0m likes this.
  3. Steffan

    Steffan Member

    PID: 1, # of mounts: 600, cmdline: init-z
    PID: 707, # of mounts: 1199, cmdline:/usr/lib/systemd/systemd-udevd
    PID: 724, # of mounts: 1205, cmdline:/usr/sbin/NetworkManager--no-daemon
    PID: 11063, # of mounts: 1201, cmdline: /usr/sbin/httpd-DFOREGROUND
    PID: 10410, # of mounts: 1203, cmdline:/usr/libexec/postfix/master-w
    PID: 1118, # of mounts: 1201, cmdline:/usr/libexec/mysqld--basedir=/usr
    PID: 1029, # of mounts: 1201, cmdline: php-fpm: master process(/etc/opt/remi/php73/php-fpm.conf)
    PID: 1037, # of mounts: 1201, cmdline: php-fpm: master process(/etc/opt/remi/php71/php-fpm.conf)
    PID: 1039, # of mounts: 1201, cmdline: php-fpm: master process(/etc/opt/remi/php56/php-fpm.conf)
    PID: 1041, # of mounts: 1202, cmdline: php-fpm: master process(/etc/php-fpm.conf)
    Total number of mounts: 28169

    its a multiserver setup. This server is running only the websites
    Abouth 600 websites. aboutgh 80G memory
    2 xeon intel cpu's
    redundant power
    redundant uplinks

    But it is in testing fase.
    I have trouble with apache hanging on every reload
    On apache restart everything is fine.
  4. till

    till Super Moderator Staff Member ISPConfig Developer

    Hmm, not sure how you get > 2800 mounts for just 600 sites. There is one bind mount for the log directory of the site, so it should be about 600 mounts. Please have a look into the /etc/fstab file to see how many mounts you have in there.
  5. till

    till Super Moderator Staff Member ISPConfig Developer

    And to answer your first question, it should be possible to have a system without any bind mounts, but there is no option for that currently and I guess some parts of the code need to be checked and potentially altered that access log files trough the website log directory instead of using the /var/log/.... path.
  6. Steffan

    Steffan Member

    The code above that i used..>

    export total=0; for i in `lsns | grep mnt | awk -e '{print $4;}'`; do echo -en "PID: $i,\t# of mounts: "; echo -n `cat /proc/$i/mounts | wc -l`; echo -en ",\tcmdline: "; cat /proc/$i/cmdline; echo ""; total=$((total + $i)); done; echo "Total number of mounts: $total"
    cat /etc/fstab | wc -l
     mount | wc -l
    But every php version is making his own mounts even if a site is not using that php version.
    Strangs thing i just noticed that every log is mounted twice on every php version

    As a example, php 56 has 2 sites using it.
    But all sites are mounted here twices
    on fstab the entrys are unique

    cat /proc/1039/mounts | grep web566
    /dev/ploop21699p1 /var/www/clients/client169/web566/log ext4 rw,relatime,data=ordered,balloon_ino=12,jqfmt=vfsv1,usrjquota=aquota.user, 0 0
    /dev/ploop21699p1 /var/www/clients/client169/web566/log ext4 rw,relatime,data=ordered,balloon_ino=12,jqfmt=vfsv1,usrjquota=aquota.user, 0 0
  7. nhybgtvfr

    nhybgtvfr Well-Known Member HowtoForge Supporter

    this line is giving an horrifically exaggerated total.
    i'd say it's quite obvious that what you're seeing on each line of output is a process using the same mounts the other processes in the list are also using, not discrete mounts reserved for that process. so you're adding the same mounts to the total repeatedly.

    i have 449 in my fstab file, what appears to be due to having a drive mounted elsewhere and bind mounted to /var/www, mount | wc -l gives me a total of 905 mounts, with all the log file mounts being duplicated, as shown in the output of cat /proc/mounts :
    /dev/nvme1n1p1 /var/www/clients/client29/web253/log ext4 rw,relatime,discard,data=ordered,jqfmt=vfsv0,usrjquota=quota.user, 0 0
    /dev/nvme1n1p1 /mnt/share-1/www/clients/client29/web253/log ext4 rw,relatime,discard,data=ordered,jqfmt=vfsv0,usrjquota=quota.user, 0 0
    yet your line of script tells me that server has a total of 114245 mounts, which is clearly wrong.
    in fact, even adding the number of mounts on each line together, it still doesn't even come close to number returned as the total, so there is something fundamentally wrong with the logic used in your original calculation.

    also, even with all those mounts, and this is on a vps with a total of 4 vcpu's, there is no discernible slowness on vps restarts, so if you're experiencing long delays on restarting, I suspect the issue lies elsewhere.
  8. Steffan

    Steffan Member

    well if the totals are correct or not.
    The vps was not working without raising the allowed mount points
    Even when i updated to max 10.000 mounts im still was getting ct has reach max mounts
    so the total is above the 10.000

    And still it is strange that if i unmount a directory the 2 lines diapear
    But when i mount -a the directory it is getting twices added to php-fpm
  9. till

    till Super Moderator Staff Member ISPConfig Developer

    It might be an issue related to the virtualization environment that you are using, I noticed it's a loop, so must be OpenVZ or Virtuozzo.
  10. Steffan

    Steffan Member

    oke its openvz7
    But on another openvz, runing the sql server with ispconfig (no websites)
    the php-fpm is not in a loop

    Also on both servers cat /proc/mounts and /etc/mstab holds only one line
    So it is strange :)

Share This Page