I am getting 504 timeouts message from nginx when my PHP script is running longer than usual. set_time_limit(0) does not seem to prevent that! Does it not work
set_time_limit(0)
I solve this trouble with config APACHE ! All methods (in this topic) is incorrect for me... Then I try chanche apache config:
Timeout 3600
Then my script worked!