I don't think that the problem is the size of the collection itself. Are the jobs that you are dispatching executed on a queue (async) or in a synchronous way? If they are synchronous that could be the problem as it tries to instantiate 1 mio jobs right away which will cause the exception. If you just want to push 1 mio jobs into a queue, this shouldn't throw an exception imho.
Sign in to participate in this thread!
We'd like to thank these amazing companies for supporting us