You need to sign in to do that
Don't have an account?
FATAL_ERROR | System.LimitException: Too many SOQL queries across namespaces: 1101
Hi everyone,
I am hitting this error in a Unit Test on an org where I am converting multiple leads in bulk. The same Unit Test passes correctly if I only convert 1 Lead. But when I try to convert 50 at once, the test method does not pass and in the debug logs I found this error:
If anyone has a clue what it could be or where I could look at, I'd appreciate it.
Thanks,
Nahuel
I am hitting this error in a Unit Test on an org where I am converting multiple leads in bulk. The same Unit Test passes correctly if I only convert 1 Lead. But when I try to convert 50 at once, the test method does not pass and in the debug logs I found this error:
FATAL_ERROR | System.LimitException: Too many SOQL queries across namespaces: 1101I have googled and searched but either noone has posted about this issue or my googlefu skills are lacking. I did find a lot of hits of a similar error of just hitting the limit, but this "across namespaces: 1101" is what's making me think this is another case.
If anyone has a clue what it could be or where I could look at, I'd appreciate it.
Thanks,
Nahuel
If you look for the section "Per-Transaction Certified Managed Package Limits" you will notice this statement - "This cumulative limit is 11 times the per-namespace limit. For example, if the per-namespace limit for SOQL queries is 100, a single transaction can perform up to 1,100 SOQL queries".
It appears that in your org, the managed packages are exceeding the system limits. You could look in the debug logs to identify which (or all) of these managed packages are causing this.
Hope this helps.
-Rajiv
Thanks for the information Rajiv.
However, there is only 1 package in this org and it's Rollup Helper, which is not causing any trouble in this specific scenario. What I did notice from profiling however, is that the Lead Trigger that is doing the Lead Convert operation, is being run 104 times when the test is run with 50 Leads. For some reason, it does not seem to be treating the operation in bulk, meaning we are doing 1 Lead Insert operation and 1 Lead Convert operation, but it seems to do a single transaction for each Lead. If that makes any sense.
Database.convertLead is overloaded, one accepts one lead only, and the other accepts a list of leads to convert. Inorder for you to make bulk calls you'd have to be invoking the later. There is a good chance you already know this, but in case you missed.
-Rajiv