#StackBounty: #centos #dns #hosts Device or resource busy – getaddrinfo

Bounty: 50

I’m on a CentOS 7 VM running PG, MariaDB, sidekiq and apache httpd. Sometimes my logs are spammed with errors such as:

unable to resolve address: System error

WARN: Mysql2::Error::ConnectionError: Unknown MySQL server host 'mariadb' (16)

WARN: PG::ConnectionBad: could not translate host name "postgres" to address: System error

WARN -- : Unable to record event with remote Sentry server (Errno::EBUSY - Failed to open TCP connection to o383708.ingest.sentry.io:443 (Device or resource busy - getaddrinfo)):

All these hosts (except the sentry service) are set to in my /etc/hosts file.

Pinging the host names appears to work from the console, these errors pop up in various application logs during runtime.

lsof | wc -l => 700k (max 1.6M)

The VM is under no significant load (10% load average). No attacks or rootkits or anything like that.

My hosts file:   localhost localhost.localdomain localhost4 localhost4.localdomain4
::1         localhost localhost.localdomain localhost6 localhost6.localdomain6 mariadb postgres mongodb redis memcached socketcluster

Anyone know what’s going on? Why can’t getaddrinfo open the hosts file???

Adding a bounty to this question. Please no freeloading.

Get this bounty!!!

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.