We run Aspose Words v24.11 in a Docker container, and it sporadically falls back to a trial license, for example, when there are issues with the Aspose Cloud API or other network issues. Moreover, the application does not produce any logs when this happens; it just silently continues to run until we restart it manually.
Is there anything we can do to mitigate this issue?
To mitigate the issue of Aspose.Words falling back to a trial license in your Docker container, especially during network issues with the Aspose Cloud API, you can implement a few strategies:
-
Regular License Status Checks: Since the metered licensing mechanism can switch to evaluation mode if it fails to communicate with the Aspose servers for 24 hours, it’s advisable to regularly check the license status. If you detect that Aspose.Words has reverted to evaluation mode, you should reapply the metered license. This can be done by calling the
SetLicense
method again in your application. -
Error Handling and Logging: Although your application currently does not produce logs when this issue occurs, implementing error handling and logging can help you identify when the license status changes. You can log the status of the license after each operation or at regular intervals to monitor any changes.
-
Docker Container Health Checks: Consider implementing health checks in your Docker container that can monitor the status of your application. If the health check detects that the application is running in evaluation mode, it can trigger a restart or reapply the license.
-
Network Resilience: Ensure that your application can handle network interruptions gracefully. Implement retry logic for network calls to the Aspose Cloud API, which can help maintain the license status during transient network issues.
By following these strategies, you can reduce the likelihood of your application falling back to a trial license and ensure smoother operation within your Docker environment.
For more detailed information on licensing and how to apply it correctly, you can refer to the official documentation on licensing for Aspose.Words here.
Sources:
[1]: Licensing and Subscription|Aspose.Words for .NET
We use the aspose/words-cloud docker image, so I don’t think these generic robotic suggestions apply to our case.
This topic has been moved to the related forum: License in a docker container - Free Support Forum - aspose.cloud