High CPU utilization can cause timeouts between your app and database. Check your app’s CPU utilization and, if your app is using most of its CPU, consider either scaling your app to have additional CPU resources or reducing concurrency in your app to reduce the CPU load.
If your app is not using most of its CPU, check your app’s connection configuration and ensure it is correct. If you’re using a DigitalOcean Managed Database, review your connection parameters.