Unable to create new inotify object - Proxmox 5.1.35

itvietnam

Renowned Member
Aug 11, 2015
132
4
83
Hi,

This morning we detected problem on our cluster running Proxmox 5.1.35

We try to migrate all VM and CT to new node, then try start services with ha-manager and see following errors:

root@node02:~# ha-manager set ct:119 --state started
Unable to create new inotify object: Too many open files at /usr/share/perl5/PVE/INotify.pm line 390.

Then i try list all CT with pct command:

root@node02:~# pct list
Unable to create new inotify object: Too many open files at /usr/share/perl5/PVE/INotify.pm line 390.
root@node02:~#

And we can not list all VM too:

root@node02:~# qm list
Unable to create new inotify object: Too many open files at /usr/share/perl5/PVE/INotify.pm line 390.
root@node02:~#

May i know how to fix this issue?
 
please double check that you sufficiently bumped both values on all your nodes - your screenshots are from different nodes ;)
 
Hi Fabian,

I can confirm this is impacted on LXC node and parameter adjusted on node2 and node1 (LXC node).

I try to separate LXC and KVM to separate nodes: some host KVM VPS and some host LXC VPS.
  • KVM nodes: not affected by this bug.
  • LXC nodes: yes, only LXC VPS caused this problem.
Firstly, we detected problem on node1 -->caused this node reboot --> all VPS migrated to node2 and node3.

After 4 hours, node2 error and i can not type any cluster command like this comment: https://forum.proxmox.com/threads/u...tify-object-proxmox-5-1-35.40881/#post-197091

I decided reboot node2 and move KVM VPS to node3 and LXC VPS to node1.
  • Node3: running up to now and no reboot
  • Node1: return errors -->i try to adjust inotify parameters but no luck. Later i have to force this node reboot.
Temporary solution: i narrow down and detected some LXC VPS just activated on that day and stop them. This LXC node is running up to date.

May we have some tip for further debug? we can start back 3 VPS caused this problem and monitor again.
 
note that those limits are not persistent across reboots unless you set them in /etc/sysctl.d/ or /etc/sysctl.conf . the only way you get those messages is if you are hitting the limits - you either need to increase them (further), or kill what/whoever is using up so much inotify resources in your containers. note that these resources are shared between containers and host, but not between VMs and host.
 
Code:
find /proc/*/fd/* -type l -lname 'anon_inode:inotify' -print 2> /dev/null

will show which PIDs have open inotify FDs, then you can simply count and map to containers via cgroups.
 
  • Like
Reactions: itvietnam
Code:
find /proc/*/fd/* -type l -lname 'anon_inode:inotify' -print 2> /dev/null

will show which PIDs have open inotify FDs, then you can simply count and map to containers via cgroups.
Thanks for your clearly TIP. I see this command on internet but not detail as your explaination.
 
There is result of command

Code:
lsof |awk '{print $1" - " $2}'|uniq -c| sort|sort -n

The result format is
Code:
Numbers of row - Command - PID
Capture.PNG
And many of pve-ha-lr.

pmxcfs open too much files. Why is it? Thanks!
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!