3

I have an RDS Aurora Serverless MySQL cluster, and I am trying to change a MySQL setting (connect_timeout). Normally, you would use a Parameter Group to set the value on the DB instance. But, since this is serverless, the instances are all managed by AWS, so it seems I can only configure the cluster.

Is there a way to set the Parameter Group that is used by the instances that AWS creates?

twiz
  • 295
  • 1
  • 4
  • 12
  • 1
    Out of curiosity, what problem do you expect to solve by changing `connect_timeout`? – Michael - sqlbot Jan 19 '19 at 22:08
  • @Michael-sqlbot When the DB cluster is paused and receives an connection request, it takes ~15-30 seconds to resume. I believe the default `connect_timeout` is 10 seconds, so this first attempt is basically guaranteed to fail. Obviously, this can be solved by retrying until a connection succeeds, but it seems strange that there isn't a better way to deal with the "resume" delay. – twiz Jan 21 '19 at 14:02
  • 1
    I wondered if that's where you were going. The delay occurs while a cold cluster is waking up, so this time elapses before the `connect_timeout` timer on the session is initialized. The initial connection to a cold Aurora Serverless cluster should not fail if your *client* doesn't time it out (it doesn't, for me, and I've observed the same cold-cluster delay you're referring to), so you'll want to look at the client configuration to remedy this, rather than the server. – Michael - sqlbot Jan 21 '19 at 18:43
  • @Michael-sqlbot Now that you point it out, that does make a lot more sense. I'm not sure how I thought an instance that wasn't running could control the timeout. haha. This is the first time I've used the "Sequelize" library. I actually had tried to set the connection timeout, but I think I may have misunderstood the docs. Anyway, thanks for solving my problem, but I'd still be interested in knowing the answer to my original question. – twiz Jan 22 '19 at 17:27
  • Future MySQL-related questions should probably be directed to dba.stackexchange.com (for setup and admin) or stackoverflow.com (for sql and performance) – Rick James Jan 27 '19 at 22:46
  • 1
    @RickJames This question is very specific to AWS and would be irrelevant to MySQL in any other environment. I had assumed ServerFault is generally the right place for AWS questions. Is this an incorrect assumption? Why do you think it would be more appropriate elsewhere? – twiz Jan 28 '19 at 00:00
  • @twiz - The various forums around here have some overlap. I won't claim to be certain that it should be moved. There are a lot of AWS/RDS questions in dba.SE. And Aurora is a fork of MySQL. I have trouble distinguishing between dba.SE and stackoverflow, both of which are heavy MySQL help sites. (So I scan both.) – Rick James Jan 28 '19 at 00:47

1 Answers1

3

Aurora Serverless has limited options for configuration customization.

With an Aurora Serverless DB cluster, you can only modify the following cluster-level parameters:

  • character_set_server

  • collation_server

  • lc_time_names

  • lower_case_table_names

  • time_zone

If you modify other cluster-level parameters, the changes have no effect, and the Aurora Serverless DB cluster uses the default values for these parameters.

...

Note

Instance-level parameters do not apply to Aurora Serverless.

https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/aurora-serverless.how-it-works.html

For the specific issue that prompted the question, connect_timeout can't be adjusted, but this timer would not be the cause of timeouts when connecting to a cold (sleeping) Aurora Serverless cluster, even though the wait time in that case can be up to about 30 seconds. This timer doesn't start running until the MySQL server has accepted the connection request, sent its initial handshake, and started waiting for the client to respond. To avoid timeouts in this situation, your client library will need to wait longer before giving up on the server.

Michael - sqlbot
  • 22,658
  • 2
  • 63
  • 86