0

We have a GKE application container running Django that connects to a Postgres database on Cloud SQL via Private IP. The application is configured to run 10 django processes per pod. Whenever a new pod is spun up (either when deploying new code or scaling to meet load) each of the 10 django processes in that pod encounters exactly one error (varies, but always database-related) when connecting to the database with all subsequent database requests being fine. We suspect that the problem is on the Django side and the requests that error do not even make it to Cloud SQL.

How do I view the network requests between the application and Cloud SQL?

jcm
  • 1,781
  • 1
  • 15
  • 27
  • 1
    A guess I would put forward would be the use of Stackdriver audit logging. Stackdriver is Google's logging infrastructure which can include deep audit logging capabilities. If we were to switch on Cloud SQL audit logging, we would then be able to capture and analyse requests into Cloud SQL ... see https://cloud.google.com/logging/docs/audit/ – Kolban Mar 30 '19 at 15:38
  • 1
    @Kolban is correct - however be careful with Stackdriver data acquisition costs. This can get expensive quickly. Last time I checked $0.50 per GB. – John Hanley Mar 30 '19 at 20:39

0 Answers0