问题
I'm running a Google cloud function and getting out-of-memory error:
Error: memory limit exceeded. Function invocation was interrupted.
However, when I profile it locally, it doesn't use more than 500-600Mb (My gcf memory allocation is 2Gb)
Is there a way to have a line-by-line profiler to
a) to see which steps result in highest memory increases, and
b) view current memory usage of the cloud function?
回答1:
This is precisely what Stackdriver Profiler is for, however Python support is currently "Planned".
来源:https://stackoverflow.com/questions/52952660/memory-profiler-for-google-cloud-function