I have a set of 4 Queueable apex classes that perform an ordered series of tasks on a large number of records. It queries a limited number of records, modifies them so that they no longer meet the WHERE requirements, then re-queues the initializing class until there are no more records called.
We have run ~600k records through these classes in the past without problems, but needed to increase the speed of processing so we changed the batch size from 500 records to 2500 records. On the first run through the process looped about five times then threw a "Too many SOQL queries: 201" error.
I checked the obvious places (for loops, recursive triggers, nested queries) and can't figure out why we would suddenly be maxing out SOQL queries. I can't find information that explains how governor limits affect queueable apex: in our initial rollout there were concerns about cumulative SOQL queries but this loop has run thousands of times in one go without issue so I assumed we were safe.
How are SOQL queries counted in queueable apex? Are there other places I should be checking to catch stray queries? In case it's relevant, the records that are actually manipulated are pulled with Database.query() and updated with Database.update().