Sean Talia
03/22/2022, 7:47 PMECSRun
flows that execute on Fargate? I've noticed a couple of times that my ECS task will run out of memory and kill my flow, but when I go to the ECS (or Cloudwatch) console, there's no way for me to actually examine those metrics for the individual ECS task that was kicked off via my ECSAgent
. From my digging around, it seems like it might have something to do with the fact that it's not actually the ECS service that my ECS task is tied to that's "responsible" for launching the ECS task (as is evidenced by the fact that the ECS dashboard says it's currently running 0 tasks even though the flow and the underlying ECS task are clearly running), but I'm not sure. I'm just trying to get better insight into the actual memory/CPU requirements of my flow, without having to, say, briefly move its execution to EC2, monitor it there, and then move it back to ECS Fargate...
Many thanks in advance for any tips!Anna Geller
Sean Talia
03/22/2022, 8:24 PMprefect-cluster
> ecs-service-for-flow-x
> Metrics, there's nothing at all that shows up in those graphsSean Talia
03/22/2022, 8:24 PMAnna Geller
Anna Geller
Sean Talia
03/22/2022, 8:35 PMAnna Geller
Anna Geller
Sean Talia
03/22/2022, 11:36 PMSean Talia
03/22/2022, 11:37 PMAnna Geller
import psutil
print('The CPU usage is: ', psutil.cpu_percent(4))
print('RAM memory % used:', psutil.virtual_memory()[2])
you could add it in the beginning and after doing some processing - maybe having one task that you call multiple times in your flow to have this extra data in your flow?Sean Talia
03/23/2022, 2:18 PM