+ Start a Discussion
Digby Bartosh 1Digby Bartosh 1 

Summer16 and Batch Apex

Ok, our sandbox has just been upgraded to Sumemr16 and we are having issues with our Batch Apex processes.  We current submit a series of batch jobs using "Database.executeBatch" and when the process gets to the 2nd one we get the following error message...
"System.LimitException: Too many async calls created: 2"
I know the limits have been changed to One limit to rule them all, but I thought this was set at 200 not 2.
Anyone else seen this or have any ideas?
thanks
Abhi_TripathiAbhi_Tripathi
The error is coming becuase you are submitting many batch classes at once to run, the same thing if you try in test class also, will show you kind of same error, I mean while you write a test class, and call more then 5 batches, then it will show you too many sync Jobs.

Try to call the another batch on completion of the first batch.

Thanks
Digby Bartosh 1Digby Bartosh 1
so this is something new in Summer16?  last week these processes were running perfectly, the only change is the upgrade...
also, the behaviour is that any more the 5 concurrent jobs, go onto the apex job queue...
thanks
CARLOS ARTURO PINTOR SALOMÓN 3CARLOS ARTURO PINTOR SALOMÓN 3
Hi,

I got the same error message: Too many async calls created:2
I have one Batch Apex class that executes another batch from the finish method. 

So, what should be the solution?

thanks!
Kelvin CheungKelvin Cheung
We're running into this as well in some Sandbox instances of our customers, and since none of our instances have been upgraded to Summer '16, we can't even test workarounds.  But it really sounds to me as if the 200 limit has mistakenly been set at 2.  If there really is a 2-async-call limit, we're going to need to make some serious changes before Summer '16 rolls out, but I'd prefer not to do this if it's just an issue with the release.

Does anyone know anything more about this one?  Thanks in advance.