Error doing job: socket.accept() out of system resource

Hello,

Since the installation of version 2022.4.4, I’ve this error after 1.5 hours.
Going back to 2022.4.3 is not solving the issue.
Nothing else was changed.

Error doing job: socket.accept() out of system resource
OSError: [Errno 24] Too many open files

I’ve done an

sudo lsof | grep hass

And it is so long that I can’t even put it here.
But, doing a grep on the last part, I’ve this

32538 lines like this one

hass 18259 19023 hass homeassistant 1023w FIFO 0,12 0t0 2323167 pipe

443 lines like this one

hass 18259 19023 hass homeassistant 22u IPv6 1669860 0t0 TCP localhost:56095->localhost:1883 (ESTABLISHED)`

11649 lines like these ones

hass 18259 19023 hass homeassistant mem REG 179,2 32188 2192741 /srv/homeassistant/lib/python3.9/site-packages/…
hass 18259 19023 hass homeassistant mem REG 179,2 53432 2430 /usr/lib/arm-linux-gnueabihf/libjbig.so.0

I’ve destroyed my venv, recreated it, nothing can do.

Please help because when this occured, HA is stuck, no connection is possible anymore to it.

My environment:

System Health

version: core-2022.4.5
installation_type: Home Assistant Core
dev: false
hassio: false
docker: false
user: homeassistant
virtualenv: true
python_version: 3.9.2
os_name: Linux
os_version: 5.15.32-v7+
arch: armv7l
timezone: Europe/Brussels

GitHub API: ok
GitHub Content: ok
GitHub Web: ok
GitHub API Calls Remaining: 4837
Installed Version: 1.24.5
Stage: running
Available Repositories: 1099
Downloaded Repositories: 25

logged_in: false
can_reach_cert_server: ok
can_reach_cloud_auth: ok
can_reach_cloud: ok

dashboards: 4
resources: 17
views: 23
mode: storage

P.S.: I read that it could be because of homekit so I removed the integration, problem is still there.
P.P.S. : Updated to 2022.4.6 in the meantime and no change.

In the meantime, but this is sad

- id: out_of_system_resource
  alias: socket.accept() out of system resource
  trigger:
  - platform: numeric_state
    entity_id: sensor.lsof
    above: '40000'
  action:
  - service: homeassistant.restart
    data: {}
  mode: restart

After way too much investigation, here is some additional info:
Interrestingly enough, everything is a multiple of 33.
hass was the parent of 32 threads : hass + 32 threads = 33 processes running.

Last part of lsof Nb Nb/33
*:8123 66 2
*:mdns 33 1
/ 66 2
/dev/null 33 1
/home/homeassistant/.homeassistant/home-assistant.log 33 1
/home/homeassistant/.homeassistant/home-assistant.log.fault 33 1
/lib/arm-linux-gnueabihf/ld-2.31.so 33 1
/lib/arm-linux-gnueabihf/libbz2.so.1.0.4 33 1
/lib/arm-linux-gnueabihf/libc-2.31.so 33 1
/lib/arm-linux-gnueabihf/libcom_err.so.2.1 33 1
/lib/arm-linux-gnueabihf/libdbus-1.so.3.19.13 33 1
/lib/arm-linux-gnueabihf/libdl-2.31.so 33 1
/lib/arm-linux-gnueabihf/libexpat.so.1.6.12 33 1
/lib/arm-linux-gnueabihf/libgcc_s.so.1 33 1
/lib/arm-linux-gnueabihf/libgpg-error.so.0.29.0 33 1
/lib/arm-linux-gnueabihf/libkeyutils.so.1.9 33 1
/lib/arm-linux-gnueabihf/liblzma.so.5.2.5 33 1
/lib/arm-linux-gnueabihf/libm-2.31.so 33 1
/lib/arm-linux-gnueabihf/libncursesw.so.6.2 33 1
/lib/arm-linux-gnueabihf/libnsl-2.31.so 33 1
/lib/arm-linux-gnueabihf/libnss_dns-2.31.so 33 1
/lib/arm-linux-gnueabihf/libnss_files-2.31.so 33 1
/lib/arm-linux-gnueabihf/libnss_mdns4_minimal.so.2 33 1
/lib/arm-linux-gnueabihf/libpcre.so.3.13.3 33 1
/lib/arm-linux-gnueabihf/libpthread-2.31.so 33 1
/lib/arm-linux-gnueabihf/libreadline.so.8.1 33 1
/lib/arm-linux-gnueabihf/libresolv-2.31.so 33 1
/lib/arm-linux-gnueabihf/librt-2.31.so 33 1
/lib/arm-linux-gnueabihf/libselinux.so.1 33 1
/lib/arm-linux-gnueabihf/libtinfo.so.6.2 33 1
/lib/arm-linux-gnueabihf/libtirpc.so.3.0.0 33 1
/lib/arm-linux-gnueabihf/libutil-2.31.so 33 1
/lib/arm-linux-gnueabihf/libz.so.1.2.11 33 1
/srv/homeassistant/lib/python3.9/site-packages/_cffi_backend.cpython-39-arm-linux-gnueabihf.so 33 1
/srv/homeassistant/lib/python3.9/site-packages/aiohttp/_helpers.cpython-39-arm-linux-gnueabihf.so 33 1
/srv/homeassistant/lib/python3.9/site-packages/aiohttp/_http_parser.cpython-39-arm-linux-gnueabihf.so 33 1
/srv/homeassistant/lib/python3.9/site-packages/aiohttp/_http_writer.cpython-39-arm-linux-gnueabihf.so 33 1
/srv/homeassistant/lib/python3.9/site-packages/aiohttp/_websocket.cpython-39-arm-linux-gnueabihf.so 33 1
/srv/homeassistant/lib/python3.9/site-packages/av/_core.cpython-39-arm-linux-gnueabihf.so 33 1
/srv/homeassistant/lib/python3.9/site-packages/av/audio/fifo.cpython-39-arm-linux-gnueabihf.so 33 1
/srv/homeassistant/lib/python3.9/site-packages/av/audio/format.cpython-39-arm-linux-gnueabihf.so 33 1
/srv/homeassistant/lib/python3.9/site-packages/av/audio/frame.cpython-39-arm-linux-gnueabihf.so 33 1
/srv/homeassistant/lib/python3.9/site-packages/av/audio/layout.cpython-39-arm-linux-gnueabihf.so 33 1
/srv/homeassistant/lib/python3.9/site-packages/av/audio/plane.cpython-39-arm-linux-gnueabihf.so 33 1
/srv/homeassistant/lib/python3.9/site-packages/av/audio/resampler.cpython-39-arm-linux-gnueabihf.so 33 1
/srv/homeassistant/lib/python3.9/site-packages/av/audio/stream.cpython-39-arm-linux-gnueabihf.so 33 1
/srv/homeassistant/lib/python3.9/site-packages/av/buffer.cpython-39-arm-linux-gnueabihf.so 33 1
/srv/homeassistant/lib/python3.9/site-packages/av/bytesource.cpython-39-arm-linux-gnueabihf.so 33 1
/srv/homeassistant/lib/python3.9/site-packages/av/codec/codec.cpython-39-arm-linux-gnueabihf.so 33 1
/srv/homeassistant/lib/python3.9/site-packages/av/codec/context.cpython-39-arm-linux-gnueabihf.so 33 1
/srv/homeassistant/lib/python3.9/site-packages/av/container/core.cpython-39-arm-linux-gnueabihf.so 33 1
/srv/homeassistant/lib/python3.9/site-packages/av/container/input.cpython-39-arm-linux-gnueabihf.so 33 1
/srv/homeassistant/lib/python3.9/site-packages/av/container/output.cpython-39-arm-linux-gnueabihf.so 33 1
/srv/homeassistant/lib/python3.9/site-packages/av/container/pyio.cpython-39-arm-linux-gnueabihf.so 33 1
/srv/homeassistant/lib/python3.9/site-packages/av/container/streams.cpython-39-arm-linux-gnueabihf.so 33 1
/srv/homeassistant/lib/python3.9/site-packages/av/descriptor.cpython-39-arm-linux-gnueabihf.so 33 1
/srv/homeassistant/lib/python3.9/site-packages/av/dictionary.cpython-39-arm-linux-gnueabihf.so 33 1
/srv/homeassistant/lib/python3.9/site-packages/av/enum.cpython-39-arm-linux-gnueabihf.so 33 1
/srv/homeassistant/lib/python3.9/site-packages/av/error.cpython-39-arm-linux-gnueabihf.so 33 1
/srv/homeassistant/lib/python3.9/site-packages/av/filter/context.cpython-39-arm-linux-gnueabihf.so 33 1
/srv/homeassistant/lib/python3.9/site-packages/av/filter/filter.cpython-39-arm-linux-gnueabihf.so 33 1
/srv/homeassistant/lib/python3.9/site-packages/av/filter/graph.cpython-39-arm-linux-gnueabihf.so 33 1
/srv/homeassistant/lib/python3.9/site-packages/av/filter/link.cpython-39-arm-linux-gnueabihf.so 33 1
/srv/homeassistant/lib/python3.9/site-packages/av/filter/pad.cpython-39-arm-linux-gnueabihf.so 33 1
/srv/homeassistant/lib/python3.9/site-packages/av/format.cpython-39-arm-linux-gnueabihf.so 33 1
/srv/homeassistant/lib/python3.9/site-packages/av/frame.cpython-39-arm-linux-gnueabihf.so 33 1
/srv/homeassistant/lib/python3.9/site-packages/av/logging.cpython-39-arm-linux-gnueabihf.so 33 1
/srv/homeassistant/lib/python3.9/site-packages/av/option.cpython-39-arm-linux-gnueabihf.so 33 1
/srv/homeassistant/lib/python3.9/site-packages/av/packet.cpython-39-arm-linux-gnueabihf.so 33 1
/srv/homeassistant/lib/python3.9/site-packages/av/plane.cpython-39-arm-linux-gnueabihf.so 33 1
/srv/homeassistant/lib/python3.9/site-packages/av/sidedata/motionvectors.cpython-39-arm-linux-gnueabihf.so 33 1
/srv/homeassistant/lib/python3.9/site-packages/av/sidedata/sidedata.cpython-39-arm-linux-gnueabihf.so 33 1
/srv/homeassistant/lib/python3.9/site-packages/av/stream.cpython-39-arm-linux-gnueabihf.so 33 1
/srv/homeassistant/lib/python3.9/site-packages/av/utils.cpython-39-arm-linux-gnueabihf.so 33 1
/srv/homeassistant/lib/python3.9/site-packages/av/video/format.cpython-39-arm-linux-gnueabihf.so 33 1
/srv/homeassistant/lib/python3.9/site-packages/av/video/frame.cpython-39-arm-linux-gnueabihf.so 33 1
/srv/homeassistant/lib/python3.9/site-packages/av/video/plane.cpython-39-arm-linux-gnueabihf.so 33 1
/srv/homeassistant/lib/python3.9/site-packages/av/video/reformatter.cpython-39-arm-linux-gnueabihf.so 33 1
/srv/homeassistant/lib/python3.9/site-packages/av/video/stream.cpython-39-arm-linux-gnueabihf.so 33 1
/srv/homeassistant/lib/python3.9/site-packages/bcrypt/_bcrypt.abi3.so 33 1
/srv/homeassistant/lib/python3.9/site-packages/ciso8601.cpython-39-arm-linux-gnueabihf.so 33 1
/srv/homeassistant/lib/python3.9/site-packages/Crypto/Cipher/_raw_aes.abi3.so 33 1
/srv/homeassistant/lib/python3.9/site-packages/Crypto/Cipher/_raw_cbc.abi3.so 33 1
/srv/homeassistant/lib/python3.9/site-packages/Crypto/Cipher/_raw_cfb.abi3.so 33 1
/srv/homeassistant/lib/python3.9/site-packages/Crypto/Cipher/_raw_ctr.abi3.so 33 1
/srv/homeassistant/lib/python3.9/site-packages/Crypto/Cipher/_raw_des.abi3.so 33 1
/srv/homeassistant/lib/python3.9/site-packages/Crypto/Cipher/_raw_des3.abi3.so 33 1
/srv/homeassistant/lib/python3.9/site-packages/Crypto/Cipher/_raw_ecb.abi3.so 33 1
/srv/homeassistant/lib/python3.9/site-packages/Crypto/Cipher/_raw_ocb.abi3.so 33 1
/srv/homeassistant/lib/python3.9/site-packages/Crypto/Cipher/_raw_ofb.abi3.so 33 1
/srv/homeassistant/lib/python3.9/site-packages/Crypto/Cipher/_Salsa20.abi3.so 33 1
/srv/homeassistant/lib/python3.9/site-packages/Crypto/Hash/_BLAKE2s.abi3.so 33 1
/srv/homeassistant/lib/python3.9/site-packages/Crypto/Hash/_ghash_portable.abi3.so 33 1
/srv/homeassistant/lib/python3.9/site-packages/Crypto/Hash/_MD5.abi3.so 33 1
/srv/homeassistant/lib/python3.9/site-packages/Crypto/Hash/_SHA1.abi3.so 33 1
/srv/homeassistant/lib/python3.9/site-packages/Crypto/Hash/_SHA256.abi3.so 33 1
/srv/homeassistant/lib/python3.9/site-packages/Crypto/Hash/_SHA512.abi3.so 33 1
/srv/homeassistant/lib/python3.9/site-packages/Crypto/Protocol/_scrypt.abi3.so 33 1
/srv/homeassistant/lib/python3.9/site-packages/Crypto/Util/_cpuid_c.abi3.so 33 1
/srv/homeassistant/lib/python3.9/site-packages/Crypto/Util/_strxor.abi3.so 33 1
/srv/homeassistant/lib/python3.9/site-packages/cryptography/hazmat/bindings/_openssl.abi3.so 33 1
/srv/homeassistant/lib/python3.9/site-packages/cryptography/hazmat/bindings/_rust.abi3.so 33 1
/srv/homeassistant/lib/python3.9/site-packages/DTLSSocket/dtls.cpython-39-arm-linux-gnueabihf.so 33 1
/srv/homeassistant/lib/python3.9/site-packages/ephem/_libastro.cpython-39-arm-linux-gnueabihf.so 33 1
/srv/homeassistant/lib/python3.9/site-packages/frozenlist/_frozenlist.cpython-39-arm-linux-gnueabihf.so 33 1
/srv/homeassistant/lib/python3.9/site-packages/lru.cpython-39-arm-linux-gnueabihf.so 33 1
/srv/homeassistant/lib/python3.9/site-packages/markupsafe/_speedups.cpython-39-arm-linux-gnueabihf.so 33 1
/srv/homeassistant/lib/python3.9/site-packages/multidict/_multidict.cpython-39-arm-linux-gnueabihf.so 33 1
/srv/homeassistant/lib/python3.9/site-packages/MySQLdb/_mysql.cpython-39-arm-linux-gnueabihf.so 33 1
/srv/homeassistant/lib/python3.9/site-packages/nacl/_sodium.abi3.so 33 1
/srv/homeassistant/lib/python3.9/site-packages/PIL/_imaging.cpython-39-arm-linux-gnueabihf.so 33 1
/srv/homeassistant/lib/python3.9/site-packages/psutil/_psutil_linux.cpython-39-arm-linux-gnueabihf.so 33 1
/srv/homeassistant/lib/python3.9/site-packages/psutil/_psutil_posix.cpython-39-arm-linux-gnueabihf.so 33 1
/srv/homeassistant/lib/python3.9/site-packages/pycares/_cares.cpython-39-arm-linux-gnueabihf.so 33 1
/srv/homeassistant/lib/python3.9/site-packages/pydantic/init.cpython-39-arm-linux-gnueabihf.so 33 1
/srv/homeassistant/lib/python3.9/site-packages/pydantic/annotated_types.cpython-39-arm-linux-gnueabihf.so 33 1
/srv/homeassistant/lib/python3.9/site-packages/pydantic/class_validators.cpython-39-arm-linux-gnueabihf.so 33 1
/srv/homeassistant/lib/python3.9/site-packages/pydantic/color.cpython-39-arm-linux-gnueabihf.so 33 1
/srv/homeassistant/lib/python3.9/site-packages/pydantic/config.cpython-39-arm-linux-gnueabihf.so 33 1
/srv/homeassistant/lib/python3.9/site-packages/pydantic/dataclasses.cpython-39-arm-linux-gnueabihf.so 33 1
/srv/homeassistant/lib/python3.9/site-packages/pydantic/datetime_parse.cpython-39-arm-linux-gnueabihf.so 33 1
/srv/homeassistant/lib/python3.9/site-packages/pydantic/decorator.cpython-39-arm-linux-gnueabihf.so 33 1
/srv/homeassistant/lib/python3.9/site-packages/pydantic/env_settings.cpython-39-arm-linux-gnueabihf.so 33 1
/srv/homeassistant/lib/python3.9/site-packages/pydantic/error_wrappers.cpython-39-arm-linux-gnueabihf.so 33 1
/srv/homeassistant/lib/python3.9/site-packages/pydantic/errors.cpython-39-arm-linux-gnueabihf.so 33 1
/srv/homeassistant/lib/python3.9/site-packages/pydantic/fields.cpython-39-arm-linux-gnueabihf.so 33 1
/srv/homeassistant/lib/python3.9/site-packages/pydantic/json.cpython-39-arm-linux-gnueabihf.so 33 1
/srv/homeassistant/lib/python3.9/site-packages/pydantic/main.cpython-39-arm-linux-gnueabihf.so 33 1
/srv/homeassistant/lib/python3.9/site-packages/pydantic/networks.cpython-39-arm-linux-gnueabihf.so 33 1
/srv/homeassistant/lib/python3.9/site-packages/pydantic/parse.cpython-39-arm-linux-gnueabihf.so 33 1
/srv/homeassistant/lib/python3.9/site-packages/pydantic/schema.cpython-39-arm-linux-gnueabihf.so 33 1
/srv/homeassistant/lib/python3.9/site-packages/pydantic/tools.cpython-39-arm-linux-gnueabihf.so 33 1
/srv/homeassistant/lib/python3.9/site-packages/pydantic/types.cpython-39-arm-linux-gnueabihf.so 33 1
/srv/homeassistant/lib/python3.9/site-packages/pydantic/typing.cpython-39-arm-linux-gnueabihf.so 33 1
/srv/homeassistant/lib/python3.9/site-packages/pydantic/utils.cpython-39-arm-linux-gnueabihf.so 33 1
/srv/homeassistant/lib/python3.9/site-packages/pydantic/validators.cpython-39-arm-linux-gnueabihf.so 33 1
/srv/homeassistant/lib/python3.9/site-packages/pydantic/version.cpython-39-arm-linux-gnueabihf.so 33 1
/srv/homeassistant/lib/python3.9/site-packages/sqlalchemy/cimmutabledict.cpython-39-arm-linux-gnueabihf.so 33 1
/srv/homeassistant/lib/python3.9/site-packages/sqlalchemy/cprocessors.cpython-39-arm-linux-gnueabihf.so 33 1
/srv/homeassistant/lib/python3.9/site-packages/sqlalchemy/cresultproxy.cpython-39-arm-linux-gnueabihf.so 33 1
/srv/homeassistant/lib/python3.9/site-packages/websockets/speedups.cpython-39-arm-linux-gnueabihf.so 33 1
/srv/homeassistant/lib/python3.9/site-packages/yarl/_quoting_c.cpython-39-arm-linux-gnueabihf.so 33 1
/usr/bin/python3.9 33 1
/usr/lib/arm-linux-gnueabihf/atlas/libblas.so.3.10.3 33 1
/usr/lib/arm-linux-gnueabihf/atlas/liblapack.so.3.10.3 33 1
/usr/lib/arm-linux-gnueabihf/gconv/gconv-modules.cache 33 1
/usr/lib/arm-linux-gnueabihf/libaom.so.0 33 1
/usr/lib/arm-linux-gnueabihf/libarmmem-v7l.so 33 1
/usr/lib/arm-linux-gnueabihf/libasound.so.2.0.0 33 1
/usr/lib/arm-linux-gnueabihf/libass.so.9.1.1 33 1
/usr/lib/arm-linux-gnueabihf/libasyncns.so.0.3.1 33 1
/usr/lib/arm-linux-gnueabihf/libatlas.so.3.10.3 33 1
/usr/lib/arm-linux-gnueabihf/libavc1394.so.0.3.0 33 1
/usr/lib/arm-linux-gnueabihf/libbcm_host.so.0 33 1
/usr/lib/arm-linux-gnueabihf/libblkid.so.1.1.0 33 1
/usr/lib/arm-linux-gnueabihf/libbluray.so.2.3.0 33 1
/usr/lib/arm-linux-gnueabihf/libbrotlicommon.so.1.0.9 33 1
/usr/lib/arm-linux-gnueabihf/libbrotlidec.so.1.0.9 33 1
/usr/lib/arm-linux-gnueabihf/libbs2b.so.0.0.0 33 1
/usr/lib/arm-linux-gnueabihf/libbsd.so.0.11.3 33 1
/usr/lib/arm-linux-gnueabihf/libcaca.so.0.99.19 33 1
/usr/lib/arm-linux-gnueabihf/libcairo.so.2.11600.0 33 1
/usr/lib/arm-linux-gnueabihf/libcairo-gobject.so.2.11600.0 33 1
/usr/lib/arm-linux-gnueabihf/libcdio.so.19.0.0 33 1
/usr/lib/arm-linux-gnueabihf/libcdio_cdda.so.2.0.0 33 1
/usr/lib/arm-linux-gnueabihf/libcdio_paranoia.so.2.0.0 33 1
/usr/lib/arm-linux-gnueabihf/libchromaprint.so.1.5.0 33 1
/usr/lib/arm-linux-gnueabihf/libcodec2.so.0.9 33 1
/usr/lib/arm-linux-gnueabihf/libcrypto.so.1.1 33 1
/usr/lib/arm-linux-gnueabihf/libdatrie.so.1.4.0 33 1
/usr/lib/arm-linux-gnueabihf/libdav1d.so.4.0.2 33 1
/usr/lib/arm-linux-gnueabihf/libdc1394.so.25.0.0 33 1
/usr/lib/arm-linux-gnueabihf/libdeflate.so.0 33 1
/usr/lib/arm-linux-gnueabihf/libdrm.so.2.4.0 33 1
/usr/lib/arm-linux-gnueabihf/libepoxy.so.0.0.0 33 1
/usr/lib/arm-linux-gnueabihf/libffi.so.7.1.0 33 1
/usr/lib/arm-linux-gnueabihf/libfftw3.so.3.5.8 33 1
/usr/lib/arm-linux-gnueabihf/libFLAC.so.8.3.0 33 1
/usr/lib/arm-linux-gnueabihf/libflite.so.2.2 33 1
/usr/lib/arm-linux-gnueabihf/libflite_cmu_us_awb.so.2.2 33 1
/usr/lib/arm-linux-gnueabihf/libflite_cmu_us_kal.so.2.2 33 1
/usr/lib/arm-linux-gnueabihf/libflite_cmu_us_kal16.so.2.2 33 1
/usr/lib/arm-linux-gnueabihf/libflite_cmu_us_rms.so.2.2 33 1
/usr/lib/arm-linux-gnueabihf/libflite_cmu_us_slt.so.2.2 33 1
/usr/lib/arm-linux-gnueabihf/libflite_cmulex.so.2.2 33 1
/usr/lib/arm-linux-gnueabihf/libflite_usenglish.so.2.2 33 1
/usr/lib/arm-linux-gnueabihf/libfontconfig.so.1.12.0 33 1
/usr/lib/arm-linux-gnueabihf/libfreetype.so.6.17.4 33 1
/usr/lib/arm-linux-gnueabihf/libfribidi.so.0.4.0 33 1
/usr/lib/arm-linux-gnueabihf/libgbm.so.1.0.0 33 1
/usr/lib/arm-linux-gnueabihf/libgcrypt.so.20.2.8 33 1
/usr/lib/arm-linux-gnueabihf/libgdk_pixbuf-2.0.so.0.4200.2 33 1
/usr/lib/arm-linux-gnueabihf/libgfortran.so.5.0.0 33 1
/usr/lib/arm-linux-gnueabihf/libgio-2.0.so.0.6600.8 33 1
/usr/lib/arm-linux-gnueabihf/libGL.so.1.7.0 33 1
/usr/lib/arm-linux-gnueabihf/libGLdispatch.so.0.0.0 33 1
/usr/lib/arm-linux-gnueabihf/libglib-2.0.so.0.6600.8 33 1
/usr/lib/arm-linux-gnueabihf/libGLX.so.0.0.0 33 1
/usr/lib/arm-linux-gnueabihf/libgme.so.0.6.3 33 1
/usr/lib/arm-linux-gnueabihf/libgmodule-2.0.so.0.6600.8 33 1
/usr/lib/arm-linux-gnueabihf/libgmp.so.10.4.1 33 1
/usr/lib/arm-linux-gnueabihf/libgnutls.so.30.29.1 33 1
/usr/lib/arm-linux-gnueabihf/libgobject-2.0.so.0.6600.8 33 1
/usr/lib/arm-linux-gnueabihf/libgomp.so.1.0.0 33 1
/usr/lib/arm-linux-gnueabihf/libgraphite2.so.3.2.1 33 1
/usr/lib/arm-linux-gnueabihf/libgsm.so.1.0.18 33 1
/usr/lib/arm-linux-gnueabihf/libgssapi_krb5.so.2.2 33 1
/usr/lib/arm-linux-gnueabihf/libharfbuzz.so.0.20704.0 33 1
/usr/lib/arm-linux-gnueabihf/libhogweed.so.6.4 33 1
/usr/lib/arm-linux-gnueabihf/libicudata.so.67.1 33 1
/usr/lib/arm-linux-gnueabihf/libicuuc.so.67.1 33 1
/usr/lib/arm-linux-gnueabihf/libidn2.so.0.3.7 33 1
/usr/lib/arm-linux-gnueabihf/libiec61883.so.0.1.1 33 1
/usr/lib/arm-linux-gnueabihf/libjack.so.0.1.0 33 1
/usr/lib/arm-linux-gnueabihf/libjbig.so.0 33 1
/usr/lib/arm-linux-gnueabihf/libjpeg.so.62.3.0 33 1
/usr/lib/arm-linux-gnueabihf/libk5crypto.so.3.1 33 1
/usr/lib/arm-linux-gnueabihf/libkrb5.so.3.3 33 1
/usr/lib/arm-linux-gnueabihf/libkrb5support.so.0.1 33 1
/usr/lib/arm-linux-gnueabihf/liblilv-0.so.0.24.12 33 1
/usr/lib/arm-linux-gnueabihf/liblz4.so.1.9.3 33 1
/usr/lib/arm-linux-gnueabihf/libmariadb.so.3 33 1
/usr/lib/arm-linux-gnueabihf/libmd.so.0.0.4 33 1
/usr/lib/arm-linux-gnueabihf/libmmal_core.so.0 33 1
/usr/lib/arm-linux-gnueabihf/libmmal_util.so.0 33 1
/usr/lib/arm-linux-gnueabihf/libmmal_vc_client.so.0 33 1
/usr/lib/arm-linux-gnueabihf/libmount.so.1.1.0 33 1
/usr/lib/arm-linux-gnueabihf/libmp3lame.so.0.0.0 33 1
/usr/lib/arm-linux-gnueabihf/libmpdec.so.2.5.1 33 1
/usr/lib/arm-linux-gnueabihf/libmpg123.so.0.45.3 33 1
/usr/lib/arm-linux-gnueabihf/libmysofa.so.1.1.0 33 1
/usr/lib/arm-linux-gnueabihf/libnettle.so.8.4 33 1
/usr/lib/arm-linux-gnueabihf/libnorm.so.1 33 1
/usr/lib/arm-linux-gnueabihf/libnsl.so.2.0.1 33 1
/usr/lib/arm-linux-gnueabihf/libogg.so.0.8.4 33 1
/usr/lib/arm-linux-gnueabihf/libopenal.so.1.19.1 33 1
/usr/lib/arm-linux-gnueabihf/libOpenCL.so.1.0.0 33 1
/usr/lib/arm-linux-gnueabihf/libopenjp2.so.2.4.0 33 1
/usr/lib/arm-linux-gnueabihf/libopenmpt.so.0.1.1 33 1
/usr/lib/arm-linux-gnueabihf/libopus.so.0.8.0 33 1
/usr/lib/arm-linux-gnueabihf/libp11-kit.so.0.3.0 33 1
/usr/lib/arm-linux-gnueabihf/libpango-1.0.so.0.4600.2 33 1
/usr/lib/arm-linux-gnueabihf/libpangocairo-1.0.so.0.4600.2 33 1
/usr/lib/arm-linux-gnueabihf/libpangoft2-1.0.so.0.4600.2 33 1
/usr/lib/arm-linux-gnueabihf/libpcre2-8.so.0.10.1 33 1
/usr/lib/arm-linux-gnueabihf/libpgm-5.3.so.0.0.128 33 1
/usr/lib/arm-linux-gnueabihf/libpixman-1.so.0.40.0 33 1
/usr/lib/arm-linux-gnueabihf/libpng16.so.16.37.0 33 1
/usr/lib/arm-linux-gnueabihf/libpocketsphinx.so.3.0.0 33 1
/usr/lib/arm-linux-gnueabihf/libpulse.so.0.23.0 33 1
/usr/lib/arm-linux-gnueabihf/librabbitmq.so.4.4.0 33 1
/usr/lib/arm-linux-gnueabihf/libraw1394.so.11.1.0 33 1
/usr/lib/arm-linux-gnueabihf/librom1394.so.0.3.0 33 1
/usr/lib/arm-linux-gnueabihf/librsvg-2.so.2.47.0 33 1
/usr/lib/arm-linux-gnueabihf/librubberband.so.2.1.2 33 1
/usr/lib/arm-linux-gnueabihf/libsamplerate.so.0.2.1 33 1
/usr/lib/arm-linux-gnueabihf/libSDL2-2.0.so.0.14.0 33 1
/usr/lib/arm-linux-gnueabihf/libserd-0.so.0.30.10 33 1
/usr/lib/arm-linux-gnueabihf/libshine.so.3.0.1 33 1
/usr/lib/arm-linux-gnueabihf/libslang.so.2.3.2 33 1
/usr/lib/arm-linux-gnueabihf/libsnappy.so.1.1.8 33 1
/usr/lib/arm-linux-gnueabihf/libsndfile.so.1.0.31 33 1
/usr/lib/arm-linux-gnueabihf/libsndio.so.7.0 33 1
/usr/lib/arm-linux-gnueabihf/libsodium.so.23.3.0 33 1
/usr/lib/arm-linux-gnueabihf/libsord-0.so.0.16.8 33 1
/usr/lib/arm-linux-gnueabihf/libsoxr.so.0.1.2 33 1
/usr/lib/arm-linux-gnueabihf/libspeex.so.1.5.0 33 1
/usr/lib/arm-linux-gnueabihf/libsphinxbase.so.3.0.0 33 1
/usr/lib/arm-linux-gnueabihf/libsqlite3.so.0.8.6 33 1
/usr/lib/arm-linux-gnueabihf/libsratom-0.so.0.6.8 33 1
/usr/lib/arm-linux-gnueabihf/libsrt-gnutls.so.1.4.2 33 1
/usr/lib/arm-linux-gnueabihf/libssh-gcrypt.so.4.8.6 33 1
/usr/lib/arm-linux-gnueabihf/libssl.so.1.1 33 1
/usr/lib/arm-linux-gnueabihf/libstdc++.so.6.0.28 33 1
/usr/lib/arm-linux-gnueabihf/libsystemd.so.0.30.0 33 1
/usr/lib/arm-linux-gnueabihf/libtasn1.so.6.6.0 33 1
/usr/lib/arm-linux-gnueabihf/libthai.so.0.3.1 33 1
/usr/lib/arm-linux-gnueabihf/libtheoradec.so.1.1.4 33 1
/usr/lib/arm-linux-gnueabihf/libtheoraenc.so.1.1.2 33 1
/usr/lib/arm-linux-gnueabihf/libtiff.so.5.6.0 33 1
/usr/lib/arm-linux-gnueabihf/libtwolame.so.0.0.0 33 1
/usr/lib/arm-linux-gnueabihf/libudev.so.1.7.0 33 1
/usr/lib/arm-linux-gnueabihf/libudfread.so.0.1.0 33 1
/usr/lib/arm-linux-gnueabihf/libunistring.so.2.1.0 33 1
/usr/lib/arm-linux-gnueabihf/libusb-1.0.so.0.3.0 33 1
/usr/lib/arm-linux-gnueabihf/libuuid.so.1.3.0 33 1
/usr/lib/arm-linux-gnueabihf/libva.so.2.1000.0 33 1
/usr/lib/arm-linux-gnueabihf/libva-drm.so.2.1000.0 33 1
/usr/lib/arm-linux-gnueabihf/libva-x11.so.2.1000.0 33 1
/usr/lib/arm-linux-gnueabihf/libvchiq_arm.so.0 33 1
/usr/lib/arm-linux-gnueabihf/libvcos.so.0 33 1
/usr/lib/arm-linux-gnueabihf/libvcsm.so.0 33 1
/usr/lib/arm-linux-gnueabihf/libvdpau.so.1.0.0 33 1
/usr/lib/arm-linux-gnueabihf/libvidstab.so.1.1 33 1
/usr/lib/arm-linux-gnueabihf/libvorbis.so.0.4.9 33 1
/usr/lib/arm-linux-gnueabihf/libvorbisenc.so.2.0.12 33 1
/usr/lib/arm-linux-gnueabihf/libvorbisfile.so.3.3.8 33 1
/usr/lib/arm-linux-gnueabihf/libwavpack.so.1.2.3 33 1
/usr/lib/arm-linux-gnueabihf/libwayland-client.so.0.3.0 33 1
/usr/lib/arm-linux-gnueabihf/libwayland-cursor.so.0.0.0 33 1
/usr/lib/arm-linux-gnueabihf/libwayland-egl.so.1.0.0 33 1
/usr/lib/arm-linux-gnueabihf/libwayland-server.so.0.1.0 33 1
/usr/lib/arm-linux-gnueabihf/libwebp.so.6.0.2 33 1
/usr/lib/arm-linux-gnueabihf/libwebpmux.so.3.0.1 33 1
/usr/lib/arm-linux-gnueabihf/libwrap.so.0.7.6 33 1
/usr/lib/arm-linux-gnueabihf/libX11.so.6.4.0 33 1
/usr/lib/arm-linux-gnueabihf/libx265.so.192 33 1
/usr/lib/arm-linux-gnueabihf/libXau.so.6.0.0 33 1
/usr/lib/arm-linux-gnueabihf/libxcb.so.1.1.0 33 1
/usr/lib/arm-linux-gnueabihf/libxcb-render.so.0.0.0 33 1
/usr/lib/arm-linux-gnueabihf/libxcb-shape.so.0.0.0 33 1
/usr/lib/arm-linux-gnueabihf/libxcb-shm.so.0.0.0 33 1
/usr/lib/arm-linux-gnueabihf/libxcb-xfixes.so.0.0.0 33 1
/usr/lib/arm-linux-gnueabihf/libXcursor.so.1.0.2 33 1
/usr/lib/arm-linux-gnueabihf/libXdmcp.so.6.0.0 33 1
/usr/lib/arm-linux-gnueabihf/libXext.so.6.4.0 33 1
/usr/lib/arm-linux-gnueabihf/libXfixes.so.3.1.0 33 1
/usr/lib/arm-linux-gnueabihf/libXi.so.6.1.0 33 1
/usr/lib/arm-linux-gnueabihf/libXinerama.so.1.0.0 33 1
/usr/lib/arm-linux-gnueabihf/libxkbcommon.so.0.0.0 33 1
/usr/lib/arm-linux-gnueabihf/libxml2.so.2.9.10 33 1
/usr/lib/arm-linux-gnueabihf/libXrandr.so.2.2.0 33 1
/usr/lib/arm-linux-gnueabihf/libXrender.so.1.3.0 33 1
/usr/lib/arm-linux-gnueabihf/libXss.so.1.0.0 33 1
/usr/lib/arm-linux-gnueabihf/libXv.so.1.0.0 33 1
/usr/lib/arm-linux-gnueabihf/libxvidcore.so.4.3 33 1
/usr/lib/arm-linux-gnueabihf/libXxf86vm.so.1.0.0 33 1
/usr/lib/arm-linux-gnueabihf/libzmq.so.5.2.4 33 1
/usr/lib/arm-linux-gnueabihf/libzstd.so.1.4.8 33 1
/usr/lib/arm-linux-gnueabihf/libzvbi.so.0.13.2 33 1
/usr/lib/arm-linux-gnueabihf/neon/vfp/libavcodec.so.58.91.100 33 1
/usr/lib/arm-linux-gnueabihf/neon/vfp/libavdevice.so.58.10.100 33 1
/usr/lib/arm-linux-gnueabihf/neon/vfp/libavfilter.so.7.85.100 33 1
/usr/lib/arm-linux-gnueabihf/neon/vfp/libavformat.so.58.45.100 33 1
/usr/lib/arm-linux-gnueabihf/neon/vfp/libavutil.so.56.51.100 33 1
/usr/lib/arm-linux-gnueabihf/neon/vfp/libpostproc.so.55.7.100 33 1
/usr/lib/arm-linux-gnueabihf/neon/vfp/libswresample.so.3.7.100 33 1
/usr/lib/arm-linux-gnueabihf/neon/vfp/libswscale.so.5.7.100 33 1
/usr/lib/arm-linux-gnueabihf/neon/vfp/libx264.so.160 33 1
/usr/lib/arm-linux-gnueabihf/pulseaudio/libpulsecommon-14.2.so 33 1
/usr/lib/arm-linux-gnueabihf/vfp/neon/libvpx.so.6.3.0 33 1
/usr/lib/locale/locale-archive 33 1
/usr/lib/python3.9/lib-dynload/_asyncio.cpython-39-arm-linux-gnueabihf.so 33 1
/usr/lib/python3.9/lib-dynload/_bz2.cpython-39-arm-linux-gnueabihf.so 33 1
/usr/lib/python3.9/lib-dynload/_contextvars.cpython-39-arm-linux-gnueabihf.so 33 1
/usr/lib/python3.9/lib-dynload/_ctypes.cpython-39-arm-linux-gnueabihf.so 33 1
/usr/lib/python3.9/lib-dynload/_decimal.cpython-39-arm-linux-gnueabihf.so 33 1
/usr/lib/python3.9/lib-dynload/_hashlib.cpython-39-arm-linux-gnueabihf.so 33 1
/usr/lib/python3.9/lib-dynload/_json.cpython-39-arm-linux-gnueabihf.so 33 1
/usr/lib/python3.9/lib-dynload/_lzma.cpython-39-arm-linux-gnueabihf.so 33 1
/usr/lib/python3.9/lib-dynload/_multibytecodec.cpython-39-arm-linux-gnueabihf.so 33 1
/usr/lib/python3.9/lib-dynload/_opcode.cpython-39-arm-linux-gnueabihf.so 33 1
/usr/lib/python3.9/lib-dynload/_queue.cpython-39-arm-linux-gnueabihf.so 33 1
/usr/lib/python3.9/lib-dynload/_sqlite3.cpython-39-arm-linux-gnueabihf.so 33 1
/usr/lib/python3.9/lib-dynload/_ssl.cpython-39-arm-linux-gnueabihf.so 33 1
/usr/lib/python3.9/lib-dynload/_uuid.cpython-39-arm-linux-gnueabihf.so 33 1
/usr/lib/python3.9/lib-dynload/_zoneinfo.cpython-39-arm-linux-gnueabihf.so 33 1
/usr/lib/python3.9/lib-dynload/readline.cpython-39-arm-linux-gnueabihf.so 33 1
/usr/lib/python3.9/lib-dynload/resource.cpython-39-arm-linux-gnueabihf.so 33 1
/usr/lib/python3.9/lib-dynload/termios.cpython-39-arm-linux-gnueabihf.so 33 1
[eventpoll] 33 1
[fde1:1918:e147:0:7795:6fad:7d26:f2a9]:mdns 33 1
[fe80::7cc2:44fd:5afd:896d]:45578 33 1
[ff02::c]:1900 33 1
239.255.255.250:1900 33 1
hassbian:1400 33 1
hassbian:21064 33 1
hassbian:21069 33 1
hassbian:21069->192.168.0.3:55406 33 1
hassbian:21069->iMac.lan:55045 33 1
hassbian:32940 33 1
hassbian:41368->synology:mysql 33 1
hassbian:41374->synology:mysql 33 1
hassbian:41376->synology:mysql 33 1
hassbian:41378->synology:mysql 33 1
hassbian:41380->synology:mysql 33 1
hassbian:46095->GW-DCEFCABD1693.lan:5684 33 1
hassbian:51296->xiaomi:6053 33 1
hassbian:54608->nodemcu:6053 33 1
hassbian:8123->hassbian:43894 33 1
hassbian:mdns 33 1
KOBJECT_UEVENT 33 1
localhost:37151->localhost:50390 33 1
localhost:50390->localhost:37151 33 1
localhost:56095->localhost:1883 33 1
pipe 32538 986
protocol: TCP 33 1
protocol: UDPv6 33 1
ROUTE 33 1
type=STREAM 132 4

For every thread, the same list from lsof

COMMAND PID TID TASKCMD USER FD TYPE DEVICE SIZE/OFF NODE NAME
hass 18259 18291 hass homeassistant 20u IPv6 1669852 0t0 TCP *:8123 (LISTEN)
hass 18259 18291 hass homeassistant 21u IPv4 1669853 0t0 TCP *:8123 (LISTEN)
hass 18259 18291 hass homeassistant 12u IPv6 1670278 0t0 UDP *:mdns
hass 18259 18291 hass homeassistant cwd DIR 179,2 4096 2 /
hass 18259 18291 hass homeassistant rtd DIR 179,2 4096 2 /
hass 18259 18291 hass homeassistant 0r CHR 1,3 0t0 4 /dev/null
hass 18259 18291 hass homeassistant 7w REG 0,68 489466256 28033 /home/homeassistant/.homeassistant/home-assistant.log
hass 18259 18291 hass homeassistant 3w REG 0,68 0 2011 /home/homeassistant/.homeassistant/home-assistant.log.fault

Then a bunch of (partial list)

COMMAND PID TID TASKCMD USER FD TYPE DEVICE SIZE/OFF NODE NAME
hass 18259 18291 hass homeassistant mem REG 179,2 222244 2202804 /srv/homeassistant/lib/python3.9/site-packages/aiohttp/_helpers.cpython-39-arm-linux-gnueabihf.so
hass 18259 18291 hass homeassistant mem REG 179,2 1612996 2202808 /srv/homeassistant/lib/python3.9/site-packages/aiohttp/_http_parser.cpython-39-arm-linux-gnueabihf.so
hass 18259 18291 hass homeassistant mem REG 179,2 214148 2202811 /srv/homeassistant/lib/python3.9/site-packages/aiohttp/_http_writer.cpython-39-arm-linux-gnueabihf.so

Then some TCP/UDP connections

COMMAND PID TID TASKCMD USER FD TYPE DEVICE SIZE/OFF NODE NAME
hass 18259 18291 hass homeassistant 4u a_inode 0,13 0 7189 [eventpoll]
hass 18259 18291 hass homeassistant 14u IPv6 1670288 0t0 UDP [fde1:1918:e147:0:7795:6fad:7d26:f2a9]:mdns
hass 18259 18291 hass homeassistant 18u IPv6 1670297 0t0 UDP [fe80::7cc2:44fd:5afd:896d]:45578
hass 18259 18291 hass homeassistant 15u IPv6 1670291 0t0 UDP [ff02::c]:1900
hass 18259 18291 hass homeassistant 16u IPv4 1670292 0t0 UDP 239.255.255.250:1900
hass 18259 18291 hass homeassistant 38u IPv4 2332068 0t0 TCP hassbian:1400 (LISTEN)
hass 18259 18291 hass homeassistant 35u IPv4 1671917 0t0 TCP hassbian:21064 (LISTEN)
hass 18259 18291 hass homeassistant 43u IPv4 1671918 0t0 TCP hassbian:21069 (LISTEN)
hass 18259 18291 hass homeassistant 65u IPv4 2473565 0t0 TCP hassbian:21069->192.168.0.3:55406 (ESTABLISHED)
hass 18259 18291 hass homeassistant 212u IPv4 2466333 0t0 TCP hassbian:21069->iMac.lan:55045 (ESTABLISHED)
hass 18259 18291 hass homeassistant 19u IPv4 1670298 0t0 UDP hassbian:32940
hass 18259 18291 hass homeassistant 8u IPv4 1668853 0t0 TCP hassbian:41368->synology:mysql (ESTABLISHED)
hass 18259 18291 hass homeassistant 75u IPv4 1674724 0t0 TCP hassbian:41374->synology:mysql (ESTABLISHED)
hass 18259 18291 hass homeassistant 76u IPv4 1675396 0t0 TCP hassbian:41376->synology:mysql (ESTABLISHED)
hass 18259 18291 hass homeassistant 60u IPv4 1674725 0t0 TCP hassbian:41378->synology:mysql (ESTABLISHED)
hass 18259 18291 hass homeassistant 77u IPv4 1672994 0t0 TCP hassbian:41380->synology:mysql (ESTABLISHED)
hass 18259 18291 hass homeassistant 34u IPv4 1671861 0t0 UDP hassbian:46095->GW-DCEFCABD1693.lan:5684
hass 18259 18291 hass homeassistant 41u IPv4 2178560 0t0 TCP hassbian:51296->xiaomi:6053 (ESTABLISHED)
hass 18259 18291 hass homeassistant 31u IPv4 1673243 0t0 TCP hassbian:54608->nodemcu:6053 (ESTABLISHED)
hass 18259 18291 hass homeassistant 26u IPv4 1669003 0t0 TCP hassbian:8123->hassbian:43894 (ESTABLISHED)
hass 18259 18291 hass homeassistant 13u IPv4 1670287 0t0 UDP hassbian:mdns
hass 18259 18291 hass homeassistant 9u netlink 0t0 1670276 KOBJECT_UEVENT
hass 18259 18291 hass homeassistant 33u IPv4 1671466 0t0 TCP localhost:37151->localhost:50390 (ESTABLISHED)
hass 18259 18291 hass homeassistant 32u IPv4 1671465 0t0 TCP localhost:50390->localhost:37151 (ESTABLISHED)
hass 18259 18291 hass homeassistant 22u IPv6 1669860 0t0 TCP localhost:56095->localhost:1883 (ESTABLISHED)

And finally, the pipe, a lot of pipes (partial list)

COMMAND PID TID TASKCMD USER FD TYPE DEVICE SIZE/OFF NODE NAME
hass 18259 18291 hass homeassistant 1001w FIFO 0,12 0t0 2298848 pipe
hass 18259 18291 hass homeassistant 1002r FIFO 0,12 0t0 2299257 pipe
hass 18259 18291 hass homeassistant 1003w FIFO 0,12 0t0 2299257 pipe
hass 18259 18291 hass homeassistant 1004w FIFO 0,12 0t0 2338849 pipe

getting this here as well…

2022-04-27 07:44:49 ERROR (MainThread) [homeassistant] Error doing job: socket.accept() out of system resource
Traceback (most recent call last):
  File "/usr/local/lib/python3.9/asyncio/selector_events.py", line 164, in _accept_connection
    conn, addr = sock.accept()
  File "/usr/local/lib/python3.9/socket.py", line 293, in accept
    fd, addr = self._accept()
OSError: [Errno 24] Too many open files
1 Like

This is a great news!
Not that you’re having the issue but we can compare the extensions we both have and maybe narrow to the culprit.
Would you mind if I’m sending you my list in private message?

:slight_smile: yes lets connect.

After a long time trying to disable one integration at a time, in my case, it seems that it is the “iphonedetect” (aka “iPhone Device Tracker”) integration that is causing the problem.

I will try to work with the author to solve this problem as I use it for the 3 iphones in the house that do not have the mobile app and it is otherwise very nice to have it.

1 Like

I went through and cleaned up alot of my messy integrations and in the process cleaned up library version conflicts and I seem to be stable now. running latest HA.

Great news!