<@ULVA73B9P> there is an issue at Prefect Cloud, a...
# ask-marvin
d
@Marvin there is an issue at Prefect Cloud, at some points all following logs are dissappeared, without any footprint. There are 7 small logs, one huge of 62 kb and 17 smaller that follow. All of them are silently dropped. I know the 62 kb might have been dropped because it exceeds 25000 cloud default limitation but why the other ones are gone? Is there any log batching? They all are produced at the same second though they are in different tasks. I wonder if reducing the size of that log to 1kb or smaller ot dropping it entirely will make all the other dropped logs appear next time
m
thought for 150.3 seconds
Yes — there is client-side log batching, and based on Prefect 3.x behavior, that is the most likely explanation for what you saw. What’s probably happening - Prefect batches logs before sending them to the API. - By default, logs are sent about every
2
seconds, not one-by-one. - So logs emitted “at the same second” from different tasks can absolutely end up in the same batch. Important detail about oversized logs - In Prefect 3.x, for flow/task logs, an oversized log is generally truncated before sending, not simply dropped. - On Prefect Cloud, the effective per-log max is capped at about
25,000
bytes. - So a
62 kb
task log by itself should not normally cause smaller logs after it to vanish just because it is too large. But batches can fail as a unit If one batch submission fails, Prefect does not retry that batch reliably at the client level. That means: - multiple logs from multiple tasks in the same time window can disappear together - this can look like “the big one and everything after it vanished” - the root cause may be batch submission failure, not necessarily the single oversized message So to your direct question: Will reducing that 62 kb log to 1 kb or dropping it make the other logs appear next time? - Possibly yes, if that large log is contributing to a batch-level failure for some reason - But not because Cloud simply rejects >25kb and then drops the rest - More accurately: reducing/removing the large log may reduce stress on the batch and make the problem disappear, but the underlying mechanism is probably batch send failure, not a documented “one oversized log poisons all following logs” rule What Prefect does by default Relevant settings: -
PREFECT_LOGGING_TO_API_BATCH_INTERVAL
default:
2.0
-
PREFECT_LOGGING_TO_API_BATCH_SIZE
default:
4000000
-
PREFECT_LOGGING_TO_API_MAX_LOG_SIZE
default is larger locally, but on Cloud it is effectively capped to
25000
So yes, there is batching. What I’d test next 1. Reduce or remove the 62 kb log - This is a good experiment. - If the following small logs reappear consistently, that strongly suggests the large message is involved in batch failure behavior. 2. Turn on internal debug logging Set:
Copy code
PREFECT_LOGGING_INTERNAL_LEVEL=DEBUG
Prefect writes API logging errors to stderr. If a batch is failing, this gives you a better chance of seeing why. 3. Look for “Error logging to API” in worker/process stderr Missing Cloud logs may be accompanied by local stderr output rather than anything visible in the Prefect UI. 4. Space out the logs if possible Since they are all emitted in the same second from different tasks, they are likely sharing one batch. Spreading them slightly can help confirm that. 5. Keep large logs well under 25 kb in Cloud Even though truncation should happen, keeping them small is still safer operationally. Bottom line - Yes, Prefect batches logs. - No, an oversized task log should not, by design, directly cause later smaller logs to be dropped just because it exceeded
25kb
. - Yes, logs emitted at the same time can disappear together if the batch fails. - Yes, reducing/removing the 62 kb log is a reasonable test and may make the smaller logs appear next time. If you want, I can also help you with a small reproducible test flow that emits: - several small logs - one oversized log - then more small logs so you can verify whether your environment is hitting batch-failure behavior.