The cursor with the timeout is actually the classifications cursor, so we should just pull all of the classification data into memory -- it won't be huge compared to sample data.  Then we should be able to run indefinitely with big data sets.