Fredrik Hoem Grelland
11/20/2025, 3:43 PMMarvin
11/20/2025, 3:43 PMMarvin
11/20/2025, 3:47 PMadd_metadata.
- The entire serialized event (including your metadata payload, resource labels, related resources, etc.) has a default maximum size of 1.5 MB (1,500,000 bytes).
- This is controlled by the PREFECT_EVENTS_MAXIMUM_SIZE_BYTES setting. If the event exceeds the limit, it’s rejected/dropped and the metadata won’t be recorded.
- There’s no separate per-key or per-value limit for metadata—just the total event size.
- Separate from runtime metadata, the static Asset description (in AssetProperties) is capped at 2,500 characters.
Cloud vs OSS:
- Same defaults and behavior are used; no documented Cloud-specific difference. In practice, Cloud could have additional gateway limits, but none are documented.
Tips:
- Keep metadata well under 1.5 MB to leave room for other event fields.
- For large blobs (schemas, samples), store them externally and add a link in metadata.
- On OSS, you can raise the limit by setting:
export PREFECT_EVENTS_MAXIMUM_SIZE_BYTES=2000000
Are you hitting the limit today? If you share a snippet or the approximate size of your metadata, I can help right-size or suggest a pattern.