Skip to main content
Participant
April 24, 2009
Question

How you've solved large batch process that doesn't time out

  • April 24, 2009
  • 1 reply
  • 588 views

Anyone figured out how to do a large batch task (say loop through database of hundred of images, resize them, update database) that doesn't

1) get timed out by the server for taking too long or....

2) get stopped by the a browser like Friefox saying "the server is directing this request in a way that will never stop"?

Need to know how some clever person has solved this.....

This topic has been closed for replies.

1 reply

Inspiring
April 24, 2009

Is this a process that a user runs or can it be automated?  If it can be automated you might use CFSCHEDULE to run many small batches instead of a single large batch.

Participant
April 24, 2009

I need to run a batch to resize a bunch of photos whenever a user logs into the site. It's basically a situation where we changed the requirements for photos, and need to resize them, but have to wait until the user logs in and gives their permission to do so.

It's up to 100 photos to resize, put data in the DB, and delete the large files, so it will probably finish before a server times out, but I'm thinking there has to be a more bulletproof way of doing it instead of just hoping it finishes.

If I use a browser redirect to keep the page going, Firefox eventually stops it with a message that says the process will never end. Haven't had luck with <cfthread> either as it seems to skip some code.