Answer the question
In order to leave comments, you need to log in
Why is the CPU loaded at 100% on the server when requesting a non-existent image?
Good day!
There is a site on Wordpress. There is a page on which 50 pictures are displayed. If the pictures have working URLs, then everything works fine, but if at least 1 broken URL appears, then a catastrophe occurs with the CPU. A powerful dedic Ryzen x1700 server with 16 cores looks like this. I'm afraid to imagine what will happen when the search bot starts to walk, for example, or users.
Why is this happening and where to dig?
Answer the question
In order to leave comments, you need to log in
I figured out there was a problem with redirecting all 404 errors to the main page. As a result, 50 broken pictures gave 50 simultaneous requests to the main one, loaded the serv.
Corrected simply, in .htaccess
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{REQUEST_URI} \.(jpg|jpeg|png|gif)$ [NC] !-f
RewriteRule .* - [R=404]
</IfModule>
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question