Console output

10 views
Skip to first unread message

Haim Ziv

unread,
Jul 23, 2019, 9:32:34 AM7/23/19
to Google Cloud SQL discuss
Hi,

I am running the Windows version of the tool.

sometimes. i am getting the message 

Client closed the local connection

I would like to monitor the tool and whenever this message appers, I want to restart the proxy

what's the best way to do it?

I've tried to export the console output to a text file, but it's exported only once the client is closed.

is there any option to export a log file while the proxy tool is running?

thanks!

Julie (cloud platform support)

unread,
Jul 23, 2019, 1:27:22 PM7/23/19
to Google Cloud SQL discuss
You can get a JSON/CSV log output from Stackdriver logs but it the message would likely only occur when the client is closed as that is when it is logged so it may not be possible to export a log before the client is closed. Stackdriver monitoring also provides details on viewing Cloud SQL metrics, including instance summary information, usage data, operation logs, and database logs. 

A small number of those errors may be expected but if it is frequent and/or causing latency it may be an issue with connection management, this document provides details on best practices suggestions. If you are implementing the best practices, please specify your use case (what service(s) are connecting with the proxy, the frequency of the connection issues etc.) as there are many causes of these connection issues or if it is expected. 

Please note that if the proxy process is terminated, all existing connections through it are dropped so making Cloud SQL proxy a persistent service is suggested. Simply restarting the proxy whenever the error occurs is likely not the solution as it would cause all existing connections to end which can cause issues for users. 
Reply all
Reply to author
Forward
0 new messages