jmac11 / googlecloudsql

Automatically exported from code.google.com/p/googlecloudsql
0 stars 0 forks source link

Need a way to persistently SET GLOBAL #68

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
On a "normal" MySQL set up you can modify my.cnf to set values such as 
`wait_timeout`.  On Cloud SQL we don't have access to my.conf.  We can use `SET 
GLOBAL` to set things such as `wait_timeout`, but if/when the instance is 
restarted the value(s) we be reset to the default(s).

It would be great to have a way to persistently set these values so that we 
don't have to remember to reset them whenever the instance is restarted.

Background: When using Cloud SQL with App Engine, a task which gets terminated 
(possibly because the instance was shut down or hit a DeadlineExceededError) 
seems to leave it connection open.  The default `wait_timeout` is 8 hours, so 
when running a lot of tasks even with a low error rate it's not long before 
you've got 100 hanging connections and the whole instance is rendered useless.  
Obviously `SET GLOBAL` applies to other settings as well, this is just one 
example. 

Original issue reported on code.google.com by adamal...@gmail.com on 13 May 2013 at 1:53

GoogleCodeExporter commented 9 years ago
A subset of MySQL global variables (including "wait_timeout") are now 
configurable: https://developers.google.com/cloud-sql/docs/mysql-flags

Please file new a new bug if a flag you need isn't supported.

Original comment by t...@google.com on 27 May 2014 at 9:29