This article will guide you through a potential cause and the respective solution to the
Sessions are being closed by the server and the following
PUSH-000046 message appears in the log.
|INFO|InboundThreadPool Thread_1|PUSH-000046|Client 1fa94yd6ce8461-0000000000001 closing - MESSAGE_QUEUE_LIMIT_REACHED.
Each connected session has its own message queue for messages from the server to the client. Each queue has limits, measured in number of messages and/or size in bytes, which can be set by the user. If the client has filled its queue the Diffusion server closes the session.
The following scenarios may cause the message queue to fill:
(1) A client is subscribing to more topics than the queue can handle i.e. too much data is going into the queue.
(2) A client is not consuming topics quickly enough, potentially due to low bandwidth i.e. not enough data is being taken out of the queue.
CLIENT_UNRESPONSIVE (because they did not respond to a ping from the server soon enough).
The maximum queue depth for clients can be configured for a client connector in
etc/Connectors.xml. A default value can also be configured in
etc/Server.xml for connectors that do not explicitly specify a value.
The maximum queue depth must be chosen carefully as a large size might lead to excessive memory usage and vulnerability to Denial of Service attacks, whilst a small size can lead to slow clients being disconnected too frequently.
Connectors.xml contains a "High Volume Connector" profile which you can use for high volume clients. If the High Volume Client intends to subscribe to 1 million topics, then that queue needs to be some multiple of 1 million items large. You should tune the profile based on testing for your particular requirements.
For more information on performance and resilience see: Tuning.