There is a flow running that attempts to insert ~150 opportunities. It is failing with a CPU Time Limit Exceeded error. When I attempt to reproduce the issue using debug on the flow, I'm getting different packages in the error. Sometimes, it will say
"CANNOT_INSERT_UPDATE_ACTIVATE_ENTITY: webm.webmergeOpportunityTrigger".
Other times it will say
"CANNOT_INSERT_UPDATE_ACTIVATE_ENTITY: npsp.TDTM_Opportunity".
Both of those are managed packages. I'm assuming I'm getting an error based on whatever package it was in when it hit the limit and stopped the process, which is why it changes on each run.
I'm trying to figure out where the error is actually happening, and so I enabled debug logs. When I find the lines that say "CLOSE TO LIMIT"
, the "close to limit" lines always say "LIMIT_USAGE_FOR_NS|(default)|"
.
Is this telling me that the limit is being hit by code running in the default namespace? I see other LIMIT_USAGE_FOR_NS
with other namespace names, and they all have almost no CPU usage.
My ultimate goal is to figure out exactly what is causing the CPU time usage. (I've been pulled in to look at something I didn't create, so I'm flying blind on where to even look.)
12:06:59.963 (16963912183)|LIMIT_USAGE_FOR_NS|(default)| Number of SOQL queries: 10 out of 100 Number of query rows: 125 out of 50000 Number of SOSL queries: 0 out of 20 Number of DML statements: 5 out of 150 Number of Publish Immediate DML: 0 out of 150 Number of DML rows: 240 out of 10000 Maximum CPU time: 10307 out of 10000 ******* CLOSE TO LIMIT