You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We currently rely on Django’s DATA_UPLOAD_MAX_MEMORY_SIZE = 20971520 # 20 MB to enforce the maximum size in bytes that a request body may be before a RequestDataTooBig exception get raised. Unfortunately, for Kafka topics and brokers, we use the default config message.max.bytes default 1 MB.
This is not a huge issue as /capture will probably return a 500 anyway if Kafka refuses to accept the message but I think we should define an event max size and enforce it in both API and Kafka (and mention it in our docs).
Expected behavior
When we send an event > limit, we should get an error describing the issue.
How to reproduce
Send an event of 10 MB, we don’t get a RequestDataTooBig
Environment
PostHog Cloud
self-hosted PostHog (ClickHouse-based), version/commit: please provide
self-hosted PostHog (Postgres-based, legacy), version/commit: please provide
Unfortunately, for Kafka topics and brokers, we use the default config message.max.bytes default 1 MB.
Note that one request can result in many kafka messages due to batching and session recording message chunking. So rather than decrease the limit, we'd need to validate each event being sent separately.
This issue hasn't seen activity in two years! If you want to keep it open, post a comment or remove the stale label – otherwise this will be closed in two weeks.
Bug description
We currently rely on Django’s
DATA_UPLOAD_MAX_MEMORY_SIZE = 20971520 # 20 MB
to enforce the maximum size in bytes that a request body may be before aRequestDataTooBig
exception get raised. Unfortunately, for Kafka topics and brokers, we use the default configmessage.max.bytes
default 1 MB.This is not a huge issue as
/capture
will probably return a 500 anyway if Kafka refuses to accept the message but I think we should define an event max size and enforce it in both API and Kafka (and mention it in our docs).Expected behavior
When we send an event > limit, we should get an error describing the issue.
How to reproduce
RequestDataTooBig
Environment
PostHog Cloud
self-hosted PostHog (ClickHouse-based), version/commit: please provide
self-hosted PostHog (Postgres-based, legacy), version/commit: please provide
Additional context
The text was updated successfully, but these errors were encountered: