I'm running the script as a task with a cron job. I'm not generating the file, the files are held in a remote ftp directory, posted by a real estate listing service. They're basically a pipe delimited files of new and modified properties for sale.
So my flow is: 1. download file, creating log as I go 2. unzip file if download was completed 3. process file and insert data into property table As I say, I use the log to keep track of the status of each file. Jeremy Thomerson wrote: > Are you generating this file during an HTTP request that is also > downloading it? > > Although I still don't understand what you're doing, try changing it to > a command line task rather than something that is triggered by HTTP. > Then execute it from the shell or cron. Then you can just rsync the files. > > Jeremy > > On Thu, Sep 24, 2009 at 7:39 AM, Tom Haskins-Vaughan > <t...@templestreetmedia.com <mailto:t...@templestreetmedia.com>> wrote: > > > Well, basically, I have to download loads of file, unzip them and > process the content. But I only get 15 minutes of execution time with my > current host, so I have a log table which tells me where I am and where > to pick up from the next time the script runs (every 20 minutes). I need > to know that the file has downloaded correctly before I unzip it so > after it's downloaded I put the enter the download_completed_at field. > Then I know that I can unzip it the next time around. > > The problem is, I'm losing the connection during the time it takes to > download the file. > > Eno wrote: > > On Wed, 23 Sep 2009, Tom Haskins-Vaughan wrote: > > > >> But the problem is, by the time I've downloaded the file, I've > lost the > >> connection (SQLSTATE[HY000]: General error: 2006 MySQL server > has gone away) > >> > >> Is there any way to reconnect the database? > > > > What does a file download have to do with your database? > > > > > > > > > > > > > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "symfony users" group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -~----------~----~----~----~------~----~------~--~---