[QUERY] Can excessive memory usage by reactor.util.concurrent.SpscArrayQueue while consuming from an EventHub be controlled? Or is this a bug? #39386
Labels
customer-reported
Issues that are reported by GitHub users external to the Azure organization.
Event Hubs
question
The issue doesn't require a change to the product in order to be resolved. Most issues start as that
Query/Question
During consumption from an EventHub, we're seeing an exceptionally large amount of memory in-use in the java heap.
In the example below there are
PartitionEvent
objects containingEventData
and thenAmqpMessageBody
bodies of roughly 148,000 bytes (which itself is multiple messages which is why the message is so large).This
ArrayList
contains about 500 of these (but could contain 549 based on the instantiated size), and theSpscArrayQueue
could contain up to 512 of these ArrayList objects.So we're trying to understand why there are over 56,000 messages in memory (8,433,524,592 total heap / 148,496 sample message size) when default cache (100) and prefetch (300) values are being used with a batch size of 999.
There seems to be one of these caches for each
partition-pump-x-x
thread as well which scales the effect of this memory usage up massively when collecting from multiple partitions or EventHubs.Why is this not a Bug or a feature Request?
Before making this a bug, we want to ensure there aren't some settings that can control this that we can make use of.
Setup (please complete the following information if applicable):
com.azure:azure-core:1.28.0
com.azure:azure-core-amqp:2.0.5.1
com.azure:azure-messaging-eventhubs:5.11.2
com.azure:azure-messaging-eventhubs-checkpointstore-blob:1.12.2
com.azure:azure-storage-blob:12.21.1
com.azure:azure-storage-common:12.16.1
Information Checklist
Kindly make sure that you have added all the following information above and checkoff the required fields otherwise we will treat the issuer as an incomplete report
The text was updated successfully, but these errors were encountered: