-
Notifications
You must be signed in to change notification settings - Fork 95
Gracefully reconnect after sas-url expires #60
Comments
Please Roy, can you investigate. |
Is there any way to override the default sas token default lifetime, what would I need to do, incase of reducing the lifetime to 30s. |
@bgshankars You can change the defines: SAS_TOKEN_DEFAULT_LIFETIME or DEFAULT_SAS_TOKEN_EXPIRY_TIME_SECS |
We did some additional digging, and it seems the refreshing of the Sas-url is not the problem. When a disconnect is done after the token lifetime expires, the socket or tls does not function correctly. The connection seems valid but the tls handshake completes too quickly. A connect message is sent over the seemingly valid connection and generates a timeout after 4 minutes. The connect after the timed out connection does succeed. Log:
|
@JetstreamRoySprowl - Any update on this one? |
Hi @Resultfactory , the SAS token refresh logic design did not intend to cause any long down time. To assist better, could you:
Thanks, |
@ewertons in our last post we explain why we do not think the sas logic is at fault anymore. Our issue of not being able to reconnect only occurs every 19 hours for 4 minutes. Our scenario:
Is there a email address we can send the iothub fqdn and deviceid to? |
Note We don't have the 4 minute connection timeout anymore since the update. Our xio still does get destroyed and recreated, is this the expected behavior? |
The SDK may be getting upset by this issue. I hope to have a fix for that problem in the next Arduino release. |
The 1.0.44 Azure IoT libraries now have the fix for the retrieveoptions problem. |
We noticed the SAS_TOKEN_DEFAULT_LIFETIME set to an hour. This causes the system to be down for 4 minutes every hour times SAS_REFRESH_MULTIPLIER 0.8.
DEFAULT_MQTT_KEEPALIVE is set to 4 * 60
SAS_TOKEN_DEFAULT_LIFETIME is set to 3600 * 24
SAS_REFRESH_MULTIPLIER 0.8
We changed the lifetime to 24 hours, but we would like to gracefully refresh the sas token and reconnect.
Preferably without the 4 minutes downtime, caused by the DEFAULT_MQTT_KEEPALIVE?
Any suggestions?
The text was updated successfully, but these errors were encountered: