• warning in Developer Console that Debug Logs exceeded limit and some must be deleted in order to set new trace flags
  • execute in DC (via Tooling API option in Query Editor) Select Id from ApexLog

When returned rows mass-selected and Delete Rows option clicked


  • Sometimes, the DC returns with 1+ popup dialog INVALID_CROSS_REFERENCE_ID [object Object] : Invalid cross reference id

The only lookup field on ApexLog is LogUserId and I could see that every ApexLog I was deleting shared the same LogUserId. Every entry being deleted was a Location SystemLog w/ Operation SerialBatchApexRangeChunkHandler

Now I know there are many alternative ways of deleting these logs but what would cause these sporadic INVALID_CROSS_REFERENCE_ID errors? They could occur whether I deleted 200, 400, or 600 rows at once - each DC bulk deletion might surface 1..12 popup dialogs with no apparent correlation to what I was doing.

Hypothesis 1 - The LogUserId happens to be a user that is concurrently running other batch jobs while I'm trying to clean up logs from previous batch jobs. Some contention occurs during the DC bulk delete

Hypothesis 2 - DC itself is having challenges refreshing the results pane during the bulk deletion and these INVALID_CROSS_REFERENCE_ID refers to objects used by DC itself.

  • I've noticed several species of weird behavior from Developer Console when interacting with log files in high volume. I've seen that requests to delete large volumes of log files often seem to delete an order of magnitude fewer logs than expected, making me wonder if Console is running batch deletes really slowly and getting into race conditions with itself. – David Reed Jan 30 '19 at 19:45
  • @DavidReed - I limited myself to deletions in batches of <= 600 and did not notice any delete an order of magnitude fewer logs than expected. But clearly based on your observations and mine, something is going on – cropredy Jan 30 '19 at 19:48
  • I was requesting deletes in batches of 2,000 and seeing only ~400 or so actually being deleted. I also saw the error you mention, although not in the volume you experienced. – David Reed Jan 30 '19 at 19:51
  • @DavidReed : I gave up on trying 2,000 as DC+Chrome would just hang; hence < 600 – cropredy Jan 30 '19 at 21:04
  • 1
    fwiw the dev console seems to do one delete at a time when you select multiple records from a query result, you can see this in action pretty easily, just more than a couple hundred rows and then refresh the query repeatedly, you'll see the number slowly tick down. – Ralph Callaway Nov 13 '19 at 1:10

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.