In some server, while we doing the long execution, pages will redirect to “504 Gateway Time-out issue“.
Its due to execution time out issue.
It will 504 issue in below cases.
1. Importing SQL from server phpMyAdmin
2. Working on uploading image process.
3. Uploading large file.
4. Any process runes more then “max_execution_time”
Solution:
The max_execution_time default set to 6000 seconds and the max_input time is set to 60 seconds. I would recommend
setting these higher.
We could update in below path in Plesk:
Home->Domains->domainname.com->PHP Settings->max_execution_time
Home->Domains->domainname.com->PHP Settings->max_input_time
Also, we could change max_execution_time and max_input_time through htaccess, php.ini OR PHP too.
Also, Some times we need to update max_children(Plesk) server.
To increase this setting, simply enter the below in the PHP settings tab > Additional configuration directives, where
X is the number you would like to increase this to. Please be aware however, that raising this too high may lead too
memory usage issues. However for the moment there is plenty of RAM available.
pm.max_children = X