<@ULVA73B9P> is this an issue? _queue.Empty 8:22:1...
# ask-marvin
o
@Marvin is this an issue? _queue.Empty 082210.497 | DEBUG | APILogWorkerThread | prefect._internal.concurrency - Running call get(timeout=1.9999279421754181) in thread 'APILogWorkerThread' 082210.497 | DEBUG | APILogWorkerThread | prefect._internal.concurrency - <WatcherThreadCancelScope, name='get' RUNNING, runtime=0.00> entered 082210.820 | DEBUG | APILogWorkerThread | prefect._internal.concurrency - <WatcherThreadCancelScope, name='get' COMPLETED, runtime=2.00> exited 082210.821 | DEBUG | APILogWorkerThread | prefect._internal.concurrency - Encountered exception in call get(<dropped>) Traceback (most recent call last): File "/app/.venv/lib/python3.12/site-packages/prefect/_internal/concurrency/calls.py", line 399, in _run_sync result = self.fn(*self.args, **self.kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/queue.py", line 179, in get raise Empty _queue.Empty 082210.823 | DEBUG | APILogWorkerThread | prefect._internal.concurrency - Running call get(timeout=1.9998934001196176) in thread 'APILogWorkerThread' 082210.824 | DEBUG | APILogWorkerThread | prefect._internal.concurrency - <WatcherThreadCancelScope, name='get' RUNNING, runtime=0.00> entered 082212.498 | DEBUG | APILogWorkerThread | prefect._internal.concurrency - <WatcherThreadCancelScope, name='get' COMPLETED, runtime=2.00> exited 082212.498 | DEBUG | APILogWorkerThread | prefect._internal.concurrency - Encountered exception in call get(<dropped>) Traceback (most recent call last): File "/app/.venv/lib/python3.12/site-packages/prefect/_internal/concurrency/calls.py", line 399, in _run_sync result = self.fn(*self.args, **self.kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/queue.py", line 179, in get raise Empty _queue.Empty 082212.500 | DEBUG | APILogWorkerThread | prefect._internal.concurrency - Running call get(timeout=1.9999417811632156) in thread 'APILogWorkerThread' 082212.500 | DEBUG | APILogWorkerThread | prefect._internal.concurrency - <WatcherThreadCancelScope, name='get' RUNNING, runtime=0.00> entered 082212.825 | DEBUG | APILogWorkerThread | prefect._internal.concurrency - <WatcherThreadCancelScope, name='get' COMPLETED, runtime=2.00> exited 082212.825 | DEBUG | APILogWorkerThread | prefect._internal.concurrency - Encountered exception in call get(<dropped>)
m
thought for 114.9 seconds
Short answer: No — that
_queue.Empty
in those DEBUG lines is expected and not an error. What you’re seeing - In Prefect 3.x, the API log worker polls an internal queue to batch/send logs to the API. When there’s nothing to pick up before the batch interval expires (default ~2s),
queue.get(timeout=...)
times out and raises
queue.Empty
. - That exception is caught internally and used to flush whatever is in the batch (possibly nothing) and continue. It repeats on the next interval — hence the periodic
_queue.Empty
at ~2s in your snippet. - It’s only visible because internal logging is at DEBUG. It does not indicate a problem unless you also see errors like “failed to send logs” or HTTP errors from
create_logs
. If you want to reduce this noise - Raise the internal logging level:
Copy code
export PREFECT_LOGGING_INTERNAL_LEVEL=ERROR
- Or keep your general logs less chatty:
Copy code
export PREFECT_LOGGING_LEVEL=INFO
- Optionally adjust/disable API log batching:
Copy code
# Make the poll less frequent
  export PREFECT_LOGGING_TO_API_BATCH_INTERVAL=5.0

  # Or disable API logging entirely
  export PREFECT_LOGGING_TO_API_ENABLED=false
Relevant settings/env vars -
PREFECT_LOGGING_INTERNAL_LEVEL
(controls internal machinery like concurrency/services) -
PREFECT_LOGGING_LEVEL
(overall Prefect logger level) -
PREFECT_LOGGING_TO_API_ENABLED
-
PREFECT_LOGGING_TO_API_BATCH_INTERVAL
-
PREFECT_LOGGING_TO_API_BATCH_SIZE
-
PREFECT_LOGGING_TO_API_MAX_LOG_SIZE
If you’re also seeing missing logs in Cloud or explicit errors about sending logs, share those details and I can help troubleshoot further.