3

I'm trying to connect a cometd client to stream platform events, however, I'm getting an error that says I've exceeded my "total events daily limit".

{"clientId":"1xj1529zd8mx3ol01sl8hlzm5ewwj","channel":"/meta/subscribe","id":"2","subscription":"/event/Workato_Trigger__e","error":"403::Organization total events daily limit exceeded","successful":false}"

The description of this error is not very specific about what limits it's talking about.

However, when I check my limits via GET /services/data/v45.0/limits/, I still have plenty of remaining calls.

Below are all the limits that contain either the words "Streaming" or "Platform".

    "DailyStandardVolumePlatformEvents": {
        "Max": 50000,
        "Remaining": 50000
    },
    "DailyStreamingApiEvents": {
        "Max": 1000000,
        "Remaining": 997927,
    },
    "MonthlyPlatformEvents": {
        "Max": 1500000,
        "Remaining": 1452923
    },
    "DailyStandardVolumePlatformEvents": {
        "Max": 50000,
        "Remaining": 50000
    },
    "DurableStreamingApiConcurrentClients": {
        "Max": 2000,
        "Remaining": 2000
    },
    "StreamingApiConcurrentClients": {
        "Max": 2000,
        "Remaining": 2000
    }

Is there another limit somewhere that I should be checking?

Also, FYI, it seems like I can still publish events without any issue.

1

According to Proactive Alert Monitoring: Durable Streaming API Limit there are two scenarios that will result in the Organization total events daily limit exceeded. error message.

  1. Excessive record updates triggering notifications
  2. Exceeding concurrent subscriber limitations

For the second scenario the help doc goes onto explain:

Exceeding concurrent subscriber limitations
The maximum concurrent subscriber count for streaming API daily limits is 10 across all Salesforce organization editions. This is a static limit and cannot be increased with a support request.

That sounds a lot like the "Maximum number of concurrent CometD clients (subscribers) across all channels and for all event types" limit from Platform Event Allocations.

While the first help doc implies a hard limit of 10, the latter has it ranging from 20 all the way up to 2,000 clients depending on the org edition.

It may well be that the first doc is out of date. It does seem odd that this error message would have anything to do with concurrent subscribers rather than the volume of events.


Another reference for that message is in the Streaming API Error Codes.

Organization total events daily limit exceeded
The maximum number of daily events has been exceeded. This error applies to any type of event, including PushTopic, generic, and platform events.

Are you using High-Volume Events? It kind of looks like you are as the MonthlyPlatformEvents limit is down to 1,452,923 from 1,500,000. What is really odd about that limit is the documentation - Monitor Your High-Volume Event Usage (my emphasis).

To monitor your monthly event delivery usage, use the limits REST API resource, and inspect the MonthlyPlatformEvents value. The limits resource returns the monthly maximum allocation. If you don’t have an add-on license, your daily default maximum allocation is the monthly allocation returned divided by 30.

From my reading you are borderline on the edge of that limit. It may just be that the REST limits resource hasn't caught up with the actual usage yet.

I'd revisit the limits resource at intervals after the error occurs to see it the values change.

  • I totally missed the part about having to divide by 30!!! I'm guessing your right about it just having a little bit of lag. I checked again this morning and now it is over the 50k mark (and everything was turned off yesterday) – NSjonas May 2 at 13:57
  • also, it turns out the reason I was hitting the limit was a rogue PushTopic running on every account update – NSjonas May 2 at 13:58
  • what doesn't make sense is the limits themselves... I can publish up to 250k AN HOUR but I can only receive 50k a day? – NSjonas May 2 at 15:49
  • 1
    1st -- the doc that states a 10 concurrent subscriber limit is incorrect, I will work to update that. – John Brock May 14 at 13:17
  • 1
    For High Volume Platform Events, the MonthlyPlatformEvents / 30 is your daily limit. However, if you are using PushTopics, this limit would not apply because that usage is counted in DailyDurableStreamingApiEvents (if you are subscribing with API > 37). And yes, that is correct regarding the delivery to subscribers - when we deliver an event to a subscriber (over CometD outside of Salesforce) we meter the usage, so 1 event delivered to 10 subscribers is 10 events. – John Brock May 14 at 13:19
-1

salesforce has some hard limitation , how many platform events can be published/subscribed for an org and please find the below details from salesforce documentation.

limitation

Another suggestion in case if it's happening due to code issue, platform event insertion occurs non-transitionally. As a result, we can’t roll back published events when exception occurs . So platform events should be created at very last when all transaction will be completed successfully.

  • I understand there are limits (which is why i posted the current usage in the question). My issue is that according to my usage I have plenty of limits remaining – NSjonas May 1 at 20:25
  • For completeness and to address your transaction point, with the Summer '19 release, we have introduced a Publish After Commit option on the event definition to ensure events are published after commit if that is the intended behavior. – John Brock May 14 at 13:22

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.