Search code examples
phpsymfonydialoginterruption

symfony2 long script interrupts and displays save dialog


i have a script that load a csv by CURL, once i have the csv it add each of the records to the database and when finished, display the total amount of registries added.

on less than 500 registries, it execute just fine, the problem is that whennever the amount of registries is too big, the execution is interrupted at some point and the browser displays the download dialog with a file named like the last part of my url withouth extension containing nothing. no warning, error or any kind of message. the database shows that it added some of the registries, if i run the script several times it adds a small amount more.

i have tried to look for someone with a similar situation but haven't find it yet.

i would appreciate any insight in the matter, i'm not sure if this is a symfony2 problem, a server configuration problem or what.

thanks in advance


Solution

  • That's more a limitation of your webserver/environment PHP is running in.

    Increase max_execution_time to allow your webserver running the request longer - alternative would be writing a console command, the cli environment isn't restricted in many cases.