Webinoly is just the perfect tool for NGINX experts. Give it a try!
0 votes
2.5k views
by Talented
I am getting regular 504 gateway errors from NginX when updating 20+ of the 1,000 or so WooCommerce products on my site, at the same time. My idea was to increase the following timeout values by adding the file `/etc/nginx/conf.d/timeout.conf` and restarting the NginX service.

proxy_connect_timeout       600;
proxy_send_timeout          600;
proxy_read_timeout          600;
send_timeout                600;

This would apply it globally, so I would prefer to make this 'fix' on a per-domain basis. How should I do this with Webinoly, or maybe this is not the correct fix, or the way to do it.

Your advice, as always, would be much appreciated.

1 Answer

0 votes
by Expert

Hi Terence,

Whatever you put in conf.d folder will have a global effect, Webinoly have support for Custom Nginx rules per site, for example: /var/www/domain.com/custom-nginx.conf, you can read about this feature, here: https://webinoly.com/en/documentation/sites/#nginx

I don't think that Proxy Nginx directives will solve your issue (I may be wrong), because your WordPress sites are not using the Reverse Proxy configuration in Nginx.

What I recommend in this case, is that first of all you should check the PHP logs and of course Webinoly have support for it: sudo log -php, because I think PHP is not responding for some reason. We have two variables for this:

  • max_execution_time  (/etc/php/7.3/fpm/php.ini)
  • request_terminate_timeout (/etc/php/7.3/fpm/pool.d/www.conf)

Both of them are set to a value of 300 seconds (5 minutes), so I think that this time is more than enough to process almost any individual request, for this reason, I think this is not the cause of your issue, but you should consider it. 

If you prefer, you can found the PHP logs here: /var/log/php/7.3/fpm.log for more details.

Also, we have an NGINX directive fastcgi_read_timeout (/etc/nginx/conf.d/fastcgi.conf) that we have set to 30 seconds, maybe you should try increasing this value. Don't forget to restart Nginx to changes take effect sudo nginx -t && sudo service nginx reload.

Finally, you should check your server resources, maybe its time to migrate to a bigger server.

Please, tell me if you have any additional question and keep me posted if you solve this issue.

Regards.

by Expert

Glad to see your issue solved!

  • The BAD: You should try to avoid using "poorly coded" plugins.
  • The GOOD: With Webinoly is really easy switch the PHP versión.
Regards.
by Talented
edited by

As always, thank you for your excellent help.

P.S. Sometimes poorly coded plugins are all us non-developers have to choose from. laugh

by Expert

Hi Terence,

Just came to my mind this issue now when I saw that PHP 7.1 will be EOL (End Of Life) in 2 more weeks (Dec 1st), which means that no updates and not even security patches will be released after this date.

You should plan your upgrades to 7.3.

Regards.

by Talented
Thanks for remembering me.  I have written to them but I am not hopeful of hearing anything positive. In fact I am not hopeful of hearing anything. Their actions and attitudes appear to me to be more like a company with a business model of "price low and provide minimal support". They stand in stark contrast to you and Webinoly.
by Rookie
edited by

I have a page with multi folder on my website, I want to show it but can not. I check in log -php:

[18-Apr-2023 22:52:46] WARNING: [pool www] child 3832793, script '/var/www/mywebsite.com/htdocs/index.php' (request: "POST /index.php?module=fileman&section=get&page=tree") execution timed out (67.891320 sec), terminating

[18-Apr-2023 22:52:46] WARNING: [pool www] child 3832485, script '/var/www/mywebsite.com/htdocs/index.php' (request: "POST /index.php?module=fileman&section=get&page=grid") execution timed out (67.891293 sec), terminating

How can I increase execution time load a page in webinoly, not only 67 sec?

I follow edit parameter like QROkes guide but not successfull, still about 60-70s to terminate.

How can I do to load the page?

Welcome to the Community site for Webinoly.

Our Optimized LEMP Web Server is a powerful set of commands for doing just about anything you could wish.

With Webinoly you can set up your NGINX web server in just one step.

* * * * * * *

To report a bug, please create a new issue on GitHub or ask a question here with the bug tag.
Webinoly Support Paypal Donations

PayPal · GitHub Sponsors · Bitcoin

It is very important that any visitor to the site read the disclaimer, terms of use and privacy and legal statement before start browsing.

...