Hi, I’ve been trying to make the following command work but no success
Reference: https://docs.digitalocean.com/products/app-platform/how-to/view-logs/#crash-logs
doctl apps logs <my_app_id> <my_component_name> --type=run_restarted
The command takes around 1 minute and then nothing happens, no output whatsoever.
Changing the --type value to run as below WORKS instantly, and all logs are output in the terminal
doctl apps logs <my_app_id> <my_component_name> --type=run
I can confirm my app crashed a few hours ago by visiting “Insights” tab in App Platform, but I cannot find out why.
What am I doing wrong?
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
Hi there,
It might be normal that you are not seeing anything from run_restarted. That log type only shows output that happened exactly at the moment the process restarted. If the app crashed without printing anything, the API can return an empty result, so what you are seeing could be expected.
Insights will still show a restart event even if there were no logs tied to it, for example if it was an OOM kill or the process exited too quickly to write anything. That could explain why --type=run shows output but --type=run_restarted comes back empty.
You could try pulling a larger window just in case:
doctl apps logs <app-id> <component> --type=run_restarted --tail=-1
If it still returns nothing, it is possible that there simply were no crash logs recorded.
I am not entirely sure though, so if you believe the app should have produced something, it might be worth asking support to check the internal event records. They can confirm whether the platform actually stored any restart logs for that timeframe.
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.