My app keeps getting suspended

Your app has auto_stop_machines and auto_start_machines set to true, which is the default for new V2 apps. With these settings, machines are downscaled when there are no incoming requests and started back when there are incoming requests.

If you also need to do some background processing in your app outside of incoming requests context, you may want to set them to false.