ホストファイルのエントリを解析できませんか?

ホストファイルのエントリを解析できませんか?

私のホストファイルには次のエントリがあります。

127.0.0.1 postgres

これはほとんどの場合に機能します。

[root@l25 log]# ping postgres
PING postgres (127.0.0.1) 56(84) bytes of data.
64 bytes from localhost (127.0.0.1): icmp_seq=1 ttl=64 time=0.031 ms
64 bytes from localhost (127.0.0.1): icmp_seq=2 ttl=64 time=0.020 ms

たまにランダムに多くのサービスで問題を解決できないと報告することがあります。

Failed to submit event: could not translate host name "postgres" to address: System error

実際、他のホストも確認できません。

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

コンピュータを再起動すると、問題はしばらくの間解決され、再度発生し始めます。

この問題の原因は何ですか?

ベストアンサー1

これは4096個のinotifyハンドラしかないからです。制限を増やしたところ、問題はなくなりました。

fs.file-max = 131070
fs.inotify.max_user_watches = 65536

おすすめ記事