Troubleshooting deployment endpoints is essential for ensuring their reliability.
Local troubleshooting
Before deploying your endpoints to Valohai, it’s highly advisable to conduct local testing. This practice offers several benefits, including:
- Issue Detection: Local testing enables you to identify and resolve any code or package-related issues more easily. By doing so, you can prevent these problems from affecting your deployed endpoints.
- Efficiency: Debugging locally is often more efficient as you have immediate access to debugging tools and can rapidly iterate on your code.
- *Confidence: Testing your endpoints locally instills confidence in your deployment. You can verify that your code functions correctly and meets your expectations.
Incorporating local testing as part of your deployment process ensures smoother and more reliable deployments on Valohai.
Troubleshooting in Valohai
Here are some key methods to diagnose and resolve issues:
- Endpoint Logs: The most straightforward way to debug is by checking the endpoint logs. If there was a runtime error in your code, logs may display a stack trace or error message (language-dependent).
- Custom Logging: You can enhance debugging by adding custom logging within your code. This helps you keep track of code execution and pinpoint issues more effectively.
- Cluster Status: For deeper insights into the deployment’s health and potential infrastructure issues, refer to the “Cluster Status” tab. This tab provides advanced details about the deployment’s internal state. For instance, if you encounter a message like “OOMKilled,” it indicates that the endpoint consumed more memory than allocated, leading to termination by the Kubernetes cluster.