Jump to content

Gateway Timeout error on back-office pages


Zohaib-fk

Recommended Posts

Hi,

I have recently change my web hosting. When I am accessing my back-office pages , I am getting gateway timeout error sometimes.

Web hosting support ready to help to fix the issue but no idea how to reproduce the issue as it comes randomly or sometimes.

I see below error message

Gateway Timeout
The gateway did not receive a timely response from the upstream server or application.


Any idea?

 

Screenshot from 2018-07-07 18-51-10.png

Screenshot from 2018-07-07 19-00-15.png

Edited by zohaib82 (see edit history)
Link to comment
Share on other sites

You use PHP-FPM

Some programmers in PHP, and I assume they work also for prestashop, do think php scripts should run for ages and should not be profiled.
Profiling and testing their code is seen as *optional* as seen recently in the latest upgrade of their version.

A work-around is to increase the execution time of your scripts.
Especially when users do use PHP-FPM

Try to define in your php-fpm.conf or the fpm related to your site

php_admin_value[max_input_time]             = 14400
php_admin_value[max_execution_time]     = 14400

and possibly in Your apache config:

        KeepAlive       On
        Timeout         14400
        ProxyTimeout    14400

I used to define two PHP-FPM, one for the front-end with strict low execution time and one, well, for the backend with high values, like this (apache, using IP)

       <Directory "/var/www/vhost/shopfr/public_html/adminXXXX/">
                 <FilesMatch "\.php$">
                        <If "-f %{REQUEST_FILENAME}">
                                SetHandler "proxy:fcgi://app-server:9001"
                        </If>
                </FilesMatch>
        </Directory>
        #
        <Directory "/var/www/vhost/shopfr/public_html/">
                <FilesMatch "\.php$">
                        <If "-f %{REQUEST_FILENAME}">
                                SetHandler "proxy:fcgi://app-server:9000"
                        </If>
                </FilesMatch>
        </Directory>

Seems currently you have no other option, until they do realize they need to be more carefull with timeouts.

Edited by amtriorix (see edit history)
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...