@tduncan / Nvidia-Optimization-Stack-VLLM Mirror · read-only / commits / a80d6f150c
Fork 0

A high-throughput and memory-efficient inference and serving engine for LLMs

Mirrored from https://github.com/tduncan-lum/Nvidia-Optimization-Stack---VLLM.git

Synced Nov 4, 12:30 UTC

better logging for large uncachable items (#41145)

Signed-off-by: h-avsha <avshalom.manevich@hcompany.ai>

Avshalom Manevich committed Apr 29, 2026 at 18:48 UTC a80d6f150c39e9e7121a54d293aa1d09619118c2
1 file changed +21 -5
vllm/multimodal/cache.py
+21 -5
@@ -511,11 +511,27 @@ class ShmObjectStoreSenderCache(BaseMultiModalProcessorCache):
511
512 self._p0_cache[mm_hash] = prompt_updates
513 return self.address_as_item(address, monotonic_id), prompt_updates
514 - except (ValueError, MemoryError) as e:
515 - # put may fail if the object is too large or
516 - # the cache is full.
517 - # In this case we log the error and keep the original mm_input.
518 - logger.debug("Failed to cache mm_input with hash %s: %s", mm_hash, e)
514 + except ValueError as e:
515 + # `put` raises ValueError either for an oversize item or for a
516 + # duplicate key (concurrent insert); the latter is benign so we
517 + # only warn on the oversize case. Subsequent UUID-only requests
518 + # for an oversize item will fail with a cache miss.
519 + if "already exists" not in str(e):
520 + logger.warning_once(
521 + "mm_input %s too large to cache; "
522 + "raise --mm-shm-cache-max-object-size-mb. (%s)",
523 + mm_hash,
524 + str(e),
525 + )
526 + return mm_item
527 + except MemoryError as e:
528 + # Cache full and protected items prevent eviction.
529 + logger.debug(
530 + "mm_input %s not cached; shm cache full, "
531 + "consider raising --mm-processor-cache-gb. (%s)",
532 + mm_hash,
533 + str(e),
534 + )
535 return mm_item
536
537 @override