Hi Matteo-
From what you’ve described, the timeout is occurring whenever the cache is automatically purged.
The first thing to check is your debug log. Add the following lines to your wp-config.php file:
define( 'WP_DEBUG', true );
define( 'WP_DEBUG_LOG', true );
define( 'WP_DEBUG_DISPLAY', false );
Once you have that, enable the plugin and update a post to recreate the error. Now, you’ll have a log of any errors in wp-content/debug.log . Let us know what errors you see there and we can do some more digging.
I also noticed you’re using an NGINX proxy. If you have root access to your server, I recommend setting a few of the NGINX configurations in /etc/nginx/conf.d/timeout.conf:
proxy_connect_timeout 600;
proxy_send_timeout 600;
proxy_read_timeout 600;
send_timeout 600;
In addition, I’d recommend setting your PHP execution time in php.ini.
max_execution_time 300
Once you’ve made all those changes, restart NGINX and see if the error persists.