Answer the question
In order to leave comments, you need to log in
How to fix "getaddrinfo ENOTFOUND localhost" error in nuxt.js after DDoS?
Hello colleagues!
I ran into an unusual problem, I did not manage to find a solution on my own. The bottom line is this: there is a website on Nuxt.js in conjunction with Laravel as a backend. With server rendering, the frontend sends requests to the backend via localhost. During DDoS attacks (there is protection against a popular service), at the very beginning, requests pass, within a minute the protection "wakes up" and the attack disappears.
The problem is that if the attack has a very high peak load, then the following happens.
1. First, there are errors of exceeding the number of open files:
ERROR EMFILE: too many open files, open '/*/*/www/app/client/static/img/image-1.svg'
ERROR EMFILE: too many open files, open '/*/*/www/app/client/static/img/image-2.png'
ERROR EMFILE: too many open files, open '/*/*/www/app/client/static/img/image-3.svg'
ERROR EMFILE: too many open files, open '/*/*/www/app/client/static/img/image-4.svg'
ERROR getaddrinfo ENOTFOUND localhost localhost:80 at GetAddrInfoReqWrap.onlookup [as oncomplete] (dns.js:57:26)
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question