Search code examples
google-cloud-platformgoogle-cloud-run

Know Cloudrun went into OOM


I have a case where I want to know if the request sent to cloudrun was terminated due to timeout being hit or due to memory limit being hit.

In both the cases I am getting 503 with "Service Unavailable" as response content.


Solution

  • As mentioned by @guillaume blaquiere,

    In both cases, the client will see a crash server side. However, on the server side, you have the details in the log. Normally, the client does not need to know the reason: there is a crash. That's all!

    To answer your question

    So basically its not possible to know the how the crash happened right?

    You may check the cloud run logs for detailed information about errors and differentiate the error. Based on the error you can try the steps mentioned in troubleshoot document

    And also you can monitor the memory used by cloud run by using monitoring tools which may help you in predicting memory outages.