Share via

MQTT sessions Maximum client sessions per authentication name = 1, exceed in specific client

Luar Dela Cruz 0 Reputation points
2026-01-02T08:43:44.6766667+00:00

We are using a service that connects to the MQTT broker service in Azure Event Grid.

It had been connecting successfully for a long time with the configuration "Maximum client sessions per authentication name = 1." Then, there was an issue in Azure where all of our clients could not connect to MQTT, so we changed the session value to 2.

Recently, we reverted it to the original configuration of 1, but two specific clients cannot connect to MQTT; they are getting a "QuotaExceeded" error while the rest of the clients are connected. What could be the cause for these specific clients being unable to connect to MQTT when the session limit is changed back to 1? They are only using one connection.

Azure Event Grid
Azure Event Grid

An Azure event routing service designed for high availability, consistent performance, and dynamic scale.

0 comments No comments

2 answers

Sort by: Most helpful
  1. Rakesh Mishra 7,215 Reputation points Microsoft External Staff Moderator
    2026-01-02T12:35:27.0366667+00:00

    Hi @Luar Dela Cruz ,

    Welcome to the Microsoft Q&A Platform! Thank you for asking your question here.

    It sounds like you're dealing with a situation where two specific clients can’t connect to the MQTT broker after reverting the session limit back to 1. Here’s a breakdown of what might be happening and some steps you can take:

    Possible Causes:
    1. Existing Active Sessions: When you set the maximum client sessions per authentication name back to 1, it might be that the two specific clients already established a session using the previous higher limit. If their sessions haven't expired, they won't be able to reconnect with a new session name until those sessions are released.
    2. Session Name Conflicts: Each client needs a unique ClientId if they are connecting with the same Username. If both clients are attempting to connect with the same session name, only the first connection will be allowed while the other gets rejected.
    3. Quotas and Limits: Check to ensure that you haven’t reached any other quotas or limits in your Event Grid namespace which might prevent new connections.
    4. Authentication Issues: Ensure that the clients are using the proper credentials and that their authentication names and the certificate fields match what's specified in your client resources.
    Troubleshooting Steps:
    1. Check Active Sessions:
      • Verify whether the problematic clients have active sessions that haven’t timed out. If possible, manually release those sessions or wait for them to expire.
    2. Review Client Configuration:
      • Ensure that both clients are using unique ClientId values while keeping the Username the same (if that’s intended).
    3. Look at Logs:
      • Review any available logs from the MQTT broker to get more insight into why the connection is being rejected specifically for those clients.
    4. Increase Session Limit Temporarily:
      • As a temporary mitigation, consider increasing the limit back to 2 to see if that resolves the issue.
    Follow-Up Questions:
    • Are there specific ClientId values assigned to the two problem clients?
    • Have you checked if there are active sessions associated with these clients?
    • Are the authentication credentials for these clients set up correctly?
    • What specific errors (if any) are showing up in the broker logs for the failed connection attempts?

    I hope this helps you get to the bottom of the issue! If you have more details or if the problem persists, feel free to share!

    References:

  2. Q&A Assist
    2026-01-02T08:44:53.46+00:00
    AI generated content. This question contains an answer created with AI from Q&A Assist. Learn more

    The "QuotaExceeded" error that the specific clients are experiencing could be due to the session overflow condition in the Azure Event Grid MQTT broker. When the maximum client sessions per authentication name is set to 1, if a client tries to connect while its previous session is still active, the connection request will be rejected. This can happen if the clients did not properly disconnect from their previous sessions or if they are still holding onto unacknowledged messages in their session queue.

    Additionally, if the clients had previously connected with a session limit of 2 and are now trying to connect with the limit reverted to 1, they may still have an active session that is preventing them from establishing a new connection. The MQTT broker maintains a queue of messages for each active session, and if the session queue reaches its limit, it can lead to a termination of the session, which might also contribute to the issue.

    To resolve this, ensure that the clients are properly disconnecting from their sessions and that there are no lingering active sessions that could be causing the quota to be exceeded. You may also want to check the session limits and ensure that they are configured correctly in the Azure portal.


    References:

    0 comments No comments

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.