504 Gateway Time-out Error on PHP Script

43k views Asked by At

I coded a script for database import, it makes a few jobs on database. When I work this script, after a few minutes I'm getting "504 Gateway Timeout Error".

I increased all timeout values on php.ini, also I increased execution times but it is still same.

2

There are 2 answers

0
Sabbir On

Write an info file on your server containing

<?php phpinfo();

View the file in your browser and check the max_execution_time

check max whats comes here

If it's 0 then there is something different to do else make sure you changed on correct ini file.

You can also check your ini file location

enter image description here

If you still can't fix it please reply :)

2
Adnan Ahmad On

You can increase maximum execution time in php.

ini_set('max_execution_time', 300); //300 seconds = 5 minutes