Fixing the ‘server busy or not enough resources’ error in WordPress

Categories: General

If you are using Nginx as your web server, one solution to this error is to update the client_max_body_size setting in your Nginx configuration. This setting specifies the maximum size of the request body, in bytes. By default, it is set to 1 megabyte (1024 kilobytes). If you are trying to upload an image that is larger than this size, you may receive the “server cannot process image” error.

To fix this error, you can try increasing the client_max_body_size setting in your Nginx configuration. Here’s how:

1) Open your Nginx configuration file. This is typically located at /etc/nginx/nginx.conf on a Linux server.

2) Find the http block in the configuration file and add the following line:

http {
    ...
    client_max_body_size [size];
}

Replace [size] with the maximum size of the request body you want to allow, in bytes. For example, to set the maximum size to 10 megabytes, you would use client_max_body_size 10m;.

3) Save the configuration file, test and restart Nginx using the following command:

sudo nginx -t
# nginx: the configuration file /etc/nginx/nginx.conf syntax is ok
# nginx: configuration file /etc/nginx/nginx.conf test is successful

sudo systemctl restart nginx

After increasing the client_max_body_size setting and restarting Nginx, you should be able to upload larger images to your WordPress website or blog without encountering the “server cannot process image” error.

However, if you are still experiencing this error after updating the client_max_body_size setting, there may be other factors at play. Here are a few additional things you can try:

  • Update the upload_max_filesize setting in PHP. This setting specifies the maximum size of a file that can be uploaded to your server. If you are trying to upload an image that is larger than this size, you may receive the “server cannot process image” error. To fix this, you can increase the upload_max_filesize setting in your PHP configuration. This is typically located at /etc/php/php.ini or /etc/php/8.2/fpm/php.ini on a Linux server. Find the upload_max_filesize setting and increase it to a larger value, then save the file and restart your web server.
  • Reduce the size of the image you’re trying to upload. The suggested maximum size for images in WordPress is 2560 pixels. If your image is larger than this, you’ll need to resize it before uploading. You can use a free image editing tool like GIMP or Adobe Photoshop to resize your image.
  • Check your server’s resource usage. If the server is busy or has a high load, it may not have enough resources available to process your image. You can check your server’s resource usage by contacting your web host or using a tool like top. If the server’s resources are maxed out, you may need to upgrade to a more powerful hosting plan or consider moving to a different web host.

Adam Patterson

Adam Patterson

User Interface Designer & Developer with a background in UX. I have spent 5 years as a professionally certified bicycle mechanic and ride year-round.

I am a husband and father of two, I enjoy photography, music, movies, coffee, and good food.

You can find me on Twitter, Instagram, and YouTube!