I am running updates via sfdx commands by sending an .apex file. The command looks like this:

sfdx force:apex:execute -f <myFile.apex> <my_org_credentials>

After running 1000 of these, I am getting this error:

This org has reached its daily usage limit of apex log headers.

I have checked all debug log configurations and emptied the ApexLog table still getting this error. It seems to me like I have reached some kind of a threshold internal to Salesforce and above mentioned is a "catch all" error.

Has anyone seen this error before? Any idea how to get around this?

  • 1
    I can't find any documentation on this, but this error suggests that you can't have any more generated debug logs for the day. The workaround would be to wait until the usage falls below the daily threshold.
    – sfdcfox
    Commented Jul 28, 2020 at 0:09
  • @sfdcfox I could enable and disable logs after this. Still able to get the logs. I have opened a case with Salesforce. Will update this thread once I hear a satisfactory answer from them. Commented Jul 28, 2020 at 3:22

1 Answer 1


This is what Salesforce came back with:

I have also checked for customer facing documentation. But couldn't locate any. I found an internal documentation at our end. For some clarity, I am sharing with you the content of the same.

DebuggingHeader is used to return the debug log in the output header.

Link: https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/sforce_api_header_debuggingheader.htm

The default for this limit is 1000 per 24hr period.

While there may be a valid reasons customer is hitting this limit a possible unintentional cause is from excessive usage of execute anonymous apex code.

Link: https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/sforce_api_calls_executeanonymous.htm

They do not increase this limit as they do in certain cases.

In short, don't run 1000 anonymous apex within 24 hours.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .