Wednesday, April 11, 2018

[google-cloud-sql-discuss] Re: Proxy in production: running headless?

You may want to try reducing cloud proxy output by using -verbose or -quiet flags as described in this documentation[1]. 

 -verbose
    When explicitly set to false, disable log messages that are not errors nor first-time startup messages (e.g. when new connections are established).

 -quiet
    Disable log messages (e.g. when new connections are established).
    WARNING: this option disables ALL logging output (including connection errors), which will likely make debugging difficult. The -quiet flag takes precedence over the -verbose flag.

Other than that, there are some ways in Linux to sending the process into the background so that you don't have to worry about the text output. Here are some examples[2][3]


[1]:https://github.com/GoogleCloudPlatform/cloudsql-proxy/blob/master/cmd/cloud_sql_proxy/cloud_sql_proxy.go
[2]:https://unix.stackexchange.com/questions/103731/run-a-command-without-making-me-wait
[3]:https://unix.stackexchange.com/questions/119648/redirecting-to-dev-null

On Tuesday, April 10, 2018 at 2:22:45 PM UTC-4, James Lampert wrote:
I've gotten to the point where I've got my Tomcat-based webapp talking to MySQL via the Proxy, and accessing a storage bucket via GCSFUSE. But at present, I'm GCSFUSEing the bucket and launching the proxy manually, from a terminal session.

It seems fairly simple to automate the GCSFUSE mount for headless operation, because it doesn't produce any ongoing console output, but what about a headless proxy? As presently launched, it spits out a line every time a connection gets opened or closed. I could, of course, redirect STDOUT and STDERR to a file, but under heavy use, that file could get very big, very fast.

--
You received this message because you are subscribed to the Google Groups "Google Cloud SQL discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-cloud-sql-discuss+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-cloud-sql-discuss/0beedccb-8886-4782-a6db-9368d3dd1753%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment