Democonverter results in "Exit Code -1" within Azure Functions
Estimated Reading Time: 1 MinutesThe problem
This case focuses on an instance where the democonverter program fails to complete successfully when invoked within an Azure function, especially under load when multiple requests are made in parallel. Users have encountered a situation where the program returns an "Exit Code -1" error while operating under the above mentioned conditions. This exit code is a generic error message, which makes it difficult to diagnose the underlying issue.
The issue arose specifically when attempting to convert multiple PS files concurrently—two requests, to be precise. While the conversion process completed in less than a second when run locally, it took significantly longer (up to 40 seconds) in the Azure environment and frequently failed with the "Exit Code -1" error. This discrepancy raised concerns about the compatibility and performance of the democonverter in cloud-based scenarios, particularly in Azure functions.
The solution
Azure uses a SMB share for storage. Running democonverter from a network share, can introduce latency and other complications. A solution is to copy democonverter to the local temporary directory (%TEMP%) of the Azure function, forcing the executable to operate from the local disk instead of the network share.
Once this adjustment was made, the democonverter functioned correctly, and the error was no longer returned. This solution highlights the importance of execution context and the potential pitfalls of running applications from network shares in cloud environments.
How to get additional help if needed
If you continue to experience issues with the democonverter or need additional assistance, please reach out for support. You can contact the support team via email at tech_support@datalogics.com. For further information, you can also visit our website at Datalogics or access our documentation at Datalogics Documentation.