xsmei
xsmei4mo ago

Service keep restarting

Two GitHub projects, prod and customer are created using Deno for data syncing. Both projects are hosted in same server instance but different folders. Both projects set schedule run where prod run from 2am till 11pm and customer run on specific hour, 7am and 5pm. Prod schedule run is running fine but customer service keep restarting and caused the schedule run not working. Questions: 1. How to troubleshoot the service issue in Deno? 2. Is it okay to share services between Deno projects with schedule run under same server?
2 Replies
Deno AI Helper
Deno AI Helper4mo ago
I wasn't able to find the answer to your question in the official Deno documentation. However, based on the information you've provided, here are a couple of general suggestions that might help you troubleshoot the issue: 1. How to troubleshoot the service issue in Deno? - Check the logs: Deno will typically output logs to the console or a file if you've configured it to do so. Review the logs for any error messages or stack traces that could indicate why the customer service is restarting. - Examine the code: Look for any unhandled exceptions or errors in your customer service code. Unhandled errors can cause a service to crash and restart. - Resource usage: Monitor the server's resource usage (CPU, memory, disk space, etc.) to ensure that the service isn't restarting due to resource constraints. - Dependencies: Ensure that all dependencies are correctly installed and compatible with the version of Deno you are using. 2. Is it okay to share services between Deno projects with schedule run under the same server? - Generally, it is okay to run multiple Deno services on the same server, provided they do not conflict with each other (e.g., trying to bind to the same port) and the server has sufficient resources to handle the load. - Ensure that each service has its own dedicated resources (like environment variables and file paths) to prevent conflicts. - If the services need to communicate with each other, make sure the communication channels (e.g., HTTP endpoints, inter-process communication) are properly secured and managed. Please note that this advice is not based on the Deno documentation, and I would advise you to double-check the accuracy of the advice given. If the issue persists, you may want to consider reaching out to the Deno
Deno AI Helper
Deno AI Helper4mo ago
community for more specific guidance or looking into more detailed logs and monitoring tools to diagnose the problem.