Another weird Max execution time of 0 seconds exceeded and pg_query () this time

I have a php script processing some big data from a database. It takes it from a table by N (tried 100 to 100000) rows and inserts it into another table. max_execution_time

is set to 0. Each iteration ends with a transaction. When selecting each part, I use pg_query()

. But after 1-2 hours my script crashes with Maximum execution time of 0 seconds exceeded

, the error message points to line with pg_query()

. Has anyone had this problem? Any treatment?

UPD

After trying the suggested answer here - setting max_input_time to -1 - still no luck. The error has moved from line pg_query

to line , which seems pretty random. So, pg_query

I guess has nothing to do with this as well max_input_time

.

+3


source to share


2 answers


Where do you get this setting from? From php.ini file? If so, search for project code for ini_set

, they have a higher priority. I bet there is one that crawls in silently.



+1


source


max_execution_time = 0

means doing forever.

However, there may be other things that can stop your script. For example apache has a default script execution timeout: 5 minutes.



see this: Is ini_set ('max_execution_time', 0) a bad idea?

+1


source







All Articles