Reading starts here
ChurnAtlas

Usage event size caps: 2 limits to check before sending

Short answer. Check Mixpanel's 1MB event limit and Amplitude's 1MB request limit before sending usage events, and decide what to do when one is rejected.

ChurnAtlas Editorial Team. How posts are made is set out in the editorial standards.

Published · Sources checked · 13 min read

  1. Inputs The signals you track and the date each one last arrived.
  2. Decision What each signal means for this customer, and which ones are missing.
  3. Next action Check the oldest signal first, then ask the customer what has changed.

Mixpanel rejects any single event over 1MB of uncompressed JSON, and Amplitude rejects any request over 1 MB, so check both before sending usage events.

Your account health score has dropped, and nothing you can see explains it. The customer has not cancelled, support has not flagged anything, and the product looks the same as it did last month. Before you ask the customer about a decline, check whether that account's usage events ever reached your analytics tool. Analytics tools can turn away data that is too large. If nobody reads the rejections, the score falls even though the customer's behavior has not changed.

Key takeaways

  • Measure your largest Mixpanel event as uncompressed JSON, counting UTF-8 bytes rather than characters.
  • Measure the whole body of each Amplitude request, not the events inside it.
  • Trim fields the health score does not read, and split only when every field is needed.
  • Log every response that is not 200 OK, and read those logs on a schedule.

This post is a decision path for two size limits you are likely to meet when you send product usage events to an analytics tool that feeds account health scores: the single-event limit in Mixpanel and the request-size limit in Amplitude. Each step ends with a choice, so you always know what comes next.

You do not need to write code to follow most of this, but you do need someone who can run a measurement on a real payload. Ask the engineer who owns the send job to help with steps one, two, and five.

Step one: measure your largest single event

Start with the smallest unit the rule covers. For Mixpanel, that unit is one event. Find the event type that carries the most data. In most products it is not the login or page-view event. It is more likely the one with a long list of properties, a pasted support transcript, a file name with extra details attached, or a field that stores a whole account record. If you cannot tell which event type that is, sort a recent export by byte size and look at the top of the list.

Serialize one of those events as JSON and measure how many bytes it takes. Use the UTF-8 byte count rather than the character count. Text written in languages other than English, and emoji, often take more bytes than people expect, so a character count can make an event look smaller than it is.

Mixpanel's events documentation states the rule: "Each event must be smaller than 1MB of uncompressed JSON; larger events are rejected." ( Mixpanel, Events and properties) Two parts of that sentence shape your check. The limit applies to each event, so a set of small events does not make one large event acceptable. And the limit applies to uncompressed JSON, so compressing the body for transit does not change the number you compare against. Measure before you compress, not after.

Decision:

  • If your largest event is well under 1MB uncompressed, go to step two. Leave a margin that covers normal growth in your data, such as a customer who starts storing longer text.
  • If your largest event is close to 1MB or over it, go to step three before that event type is sent again.

One caution: measure real events, not test events. A test event with two short properties tells you nothing about the event your largest enterprise customer generates on a busy day. Pull a sample from production, and include the outliers, because the outliers are what hit the limit.

Keep in mind that the event that matters is the one a customer can make large, not the one that is large on average. An average can look safe while a single heavy account pushes one event type past the limit.

Step two: measure the whole request

Amplitude's HTTP V2 API has a different check. The limit there applies to the request as a whole, and the error text says so: "The payload size is too big (request size exceeds 1 MB)." ( Amplitude, HTTP V2 API) Measure the entire body you post in a single request, not each event inside it.

This check catches a problem that step one does not. A request built from many small events can fail even when each event on its own is far under the limit. The size of the request grows with batching. A job that once sent a handful of events in each request can send many more after a customer connects a new integration, a backfill runs, or a retry puts events back into the queue. Nobody has to change the code for the request to grow.

So measure at the point where your code sends the body, not in a separate test that builds a sample. Log the size of the largest request per day for a week. If the number moves up with activity, that trend is the one to watch. A steady rise will eventually cross the line on a day when nobody expects it.

To get the numbers, pull two values from the send job's logs: the largest body sent on a typical day, and the largest body sent on the busiest day of the last quarter. If the busiest day is close to the limit, the job needs attention even when a normal day looks fine. The busiest day is the one that will fail first.

Decision:

  • If your largest request is under 1 MB with room to spare, the size check passes for now. Go to step four so that you can see any failures that do happen.
  • If your largest request is close to 1 MB, or the daily trend is climbing toward the limit, go to step three.

Illustrative example: one request at the limit

Suppose a send job posts 200 events in one request, and each event is about 5 kilobytes. The request body is roughly 1 MB, which sits at the request limit from step two. Trim or split before the next send, then re-measure the whole body.

Keep the two checks separate. A pass on the Mixpanel single-event check tells you nothing about Amplitude's request check, and the reverse is also true. A pipeline that sends to both tools needs both checks, each measured against the limit that applies to that tool.

Step three: decide whether to trim or split

Once a payload is too large, you have two options. Which one you pick depends on what is inside the large part. Make the decision with someone who knows which fields the health score actually reads. For a related checklist, see usage event fields before a health score.

Trim when the bulk is not used. A full email body, a pasted chat transcript, or a complete page capture kept for debugging is rarely needed to calculate an account health score. The score usually runs on counts, timestamps, feature names, and an account identifier. Ask the team that owns the score to list the fields it reads. Anything not on that list can go. If someone may need the full record later, keep a pointer to it in your own system rather than sending the full text to the analytics tool.

Split when every field is needed. Send one large event as several smaller events, or send one large request as several smaller ones, each under the limit. Give every piece a shared identifier so you can rejoin them later in your warehouse or in the tool. Be careful that splitting does not change what the data means. If you split one purchase into two purchase events, a count in the score doubles. A safer approach is to send the pieces under a separate event type, or to add a part number property. Then confirm with the score's owner that the score reads those pieces the way it should.

Re-measure every piece after you split or trim. Do not assume that two halves are each half the size. If you copy the same long text into both halves, you have solved nothing, and the second half may fail the same check as the first.

Suppose a support-ticket event includes the full ticket body, the agent's internal notes, and a count of how many times the customer opened the ticket. The health score needs only the count and the timestamps. The ticket body and the notes are not used, so you trim them out, keep a link to the ticket in your own system, and re-measure. Now suppose a feature-usage event carries a list of every field a customer touched during a session, and the score counts each one. That list is needed, so you split the session into several events. Each one carries a slice of the list and a shared session identifier. Then check that the score adds the slices back together correctly.

Decision:

  • If the large field is not used by the score, trim it, re-measure, and go to step four.
  • If every field is used, split the event, re-measure each piece, and go to step four.
  • If splitting would change what the event means, stop. Do not drop the data quietly. Bring the question to the people who own the metric, and agree on what the score should do while the question is open.

Step four: plan for the send that fails

A size check before sending lowers the chance of a rejection. It does not replace handling the response, and handling the response is where most silent gaps appear. The API's guidance on this point is direct: "Amplitude recommends that you add your own logging to capture responses other than 200." It also says: "If you don't receive a 200 OK response, retry your request."

Log every response that is not a 200 with enough detail to find the request again: the time, the event type, the account identifier, and the size of the body you sent. The log is what lets you tell a size failure from every other kind. Once you can tell them apart, the next action depends on the reason.

Decision:

  • If the response is 200 OK, record the success and move on.
  • If the response is not 200 and the body was over the size limit, go back to step three and make the body smaller. Size failures are the one exception to retrying: do not resend the same body, because it will fail again.
  • If the response is not 200 for a reason other than size, log it and retry as the guidance describes.

The single-event rule from step one has the same blind spot. The rule says large events are rejected. How that rejection reaches your code depends on your integration, so confirm it there. Find out whether your SDK raises an error, returns a status value, or writes to a log, and make sure someone reads that output on a schedule. From the health score's point of view, a rejection nobody sees looks exactly like data that was never sent.

Step five: check the basics before you send

Size is one reason a send fails. Three other basic checks are worth running at the same time, because they cost little and they prevent failures that can look like size problems.

The first is the content type. The API's own wording is: "To send data to the Amplitude HTTP V2 API, set the Content-Type header to application/json." If a library sends a different content type, the request may fail for a reason that has nothing to do with data size, and a team can spend a day chasing the wrong cause. Check the header on a real request, not only in the library's default settings. A wrapper or proxy can change it.

The second is the body itself. Confirm that every event in the request is valid JSON before it is sent. A single malformed value can cause a request to fail. In a large batch, that failure is hard to tell apart from a size problem. Validating before send is cheaper than debugging a rejected batch afterward.

Field values are the third common source of trouble. The same API's field definitions are strict about formats. The currency field on a purchase event is specified as "a 3-character uppercase ISO 4217 code (for example, USD, EUR)." A value such as "usd" or "$" does not match that format, and in a large batch the error can be hard to tell from a size problem. Check each field type against the definition before you rule out size.

If your pipeline also sends to Google Analytics 4, its guidance describes the basic shape of a send in similar terms: "To send an event, use an HTTP POST request to the specified endpoint with the correct host and a JSON body containing the event data." ( Google for Developers, Sending events) Check the method, endpoint, host, and body on a real request. Those four things are easy to get wrong after a config change.

Decision:

  • If the content type, the JSON check, and the field formats all pass, the send path is ready for the size checks above.
  • If any check fails, fix it first, then repeat steps one and two. A format change can change the sizes you measured, so an earlier measurement may no longer be accurate.

Watch the numbers after the checks pass

Passing the checks once is not enough, because event sizes change over time. Set up a simple daily view, owned by whoever owns the send job, with three numbers: the size of the largest event for each event type, the size of the largest request, and the count of sends that succeeded compared with sends that failed or were rejected. For the data checks behind the score, see event data checks for health scores.

Customer success managers should care most about the third number. A rise in rejected events for one account looks, inside the health score, like a fall in usage. If an account's score drops sharply with no change in its contract, no new support issues, and no change in its sales relationship, check whether that account's events are arriving at the same rate they did before. It also prevents the uncomfortable conversation where a customer is asked about a decline that never happened.

Revisit the checks whenever the product changes. A new feature that stores more text, a new integration that sends larger records, or a change to batching can push the numbers past a limit without warning. Repeat steps one and two after each of those changes, and treat the change as incomplete until the checks pass.

Bring the data team numbers and a decision, not a general worry about limits. "We need the largest request size for the last quarter and the list of fields the score reads" gets a usable answer. "Can you check the limits" does not.

Your next step today

Pull a sample of recent production events of your largest type and measure each one's UTF-8 bytes. If any is close to 1MB, go to step three before that type is sent again.

Putting the path together

The checks above are summarized in one table. Keep it near the send job's documentation.

Step What you measure Limit it is checked against If it fails
1 Largest single Mixpanel event, as uncompressed JSON 1MB for each event Trim or split that event type
2 Full body of the largest Amplitude request 1 MB for each request Trim, split, or send smaller batches
4 Every response that is not 200 OK 200 OK Log it; shrink oversized bodies; retry other failures
5 Content-Type header, JSON validity, and field formats application/json, valid JSON, documented formats Fix the format, then re-measure steps one and two
Ongoing Daily sizes and success counts Your own trend, compared with the limits above Check rejected counts before you conclude usage has fallen

Before you change anything, write down each decision and who approved it.

Neither limit is hard to respect once you measure it, and neither is hard to forget. The measurement is the part that tends to slip. Put it on the calendar, attach it to the job that sends the data, and make the health score's owner part of the decision whenever a field has to be trimmed or split.

Related guides: Check 4 analytics caps before the company usage review · Usage data limits: 7 caps to check before a feed breaks.

Sources

Limits of this post

This post is general operational information, not legal advice about notice periods or renewal clauses. It does not promise that any method keeps a customer. Software can get a fact wrong, so open the sources before you act.