Sometimes an Apex request gets interrupted/terminated by Force.com. The underlying Apex request contains numerous DML statments (insert into around 13 custom objects) all of which marked at a savepoint. There are no triggers/workflows/formula fields. Also these objects don't have too many fields. There are only few hundreds of records.
- What could be possible reasons for DML operation to run long and be interrupted by Force.com?
- As these are runtime exception, what is the best possible way to handle/react to these exceptions?
- What troubleshooting will help?
Appreciate any suggestion.
In no particular order...
SELECT ... FOR UPDATEthat might cause the request to wait for a resource?
VLOOKUP()in validation rule?