0
votes

We are developing a Ruby on Rails app on AWS elastic beanstalk connected to AWS Aurora MySQL cluster (provisioned). We have some long -running queries and we are experiencing error 504 when we run them, it appears that this happens consistently at the 1 minute mark, we have done many configurations (listed below) to try to increase this threshold without any luck.

We changed this in nginx.conf:
keepalive_timeout 400s ;

And also:
proxy_connect_timeout 43200000;
proxy_read_timeout 43200000;
proxy_send_timeout 43200000;

We already changed the Idle timeout of the Load Balancer in Elastic Beanstalk to 300s.

We thought of changing the MySQL Timeout Variables in Aurora which have this configuration by default:

interactive_timeout: 28800
wait_timeout: 28800
...

By changing Aurora's Group Parameters but I got this error:

Error saving: Cannot modify a default parameter group. (Service: AmazonRDS; Status Code: 400; Error Code: InvalidParameterValue; Request ID: 814984cf-7231-4dd8-b3dd-762b16132652)

I also tried creating a new parameter group, however when I try to assign it to database cluster/instance only the default parameter group appears as an option.

Does anyone have an insight?

1

1 Answers

1
votes

Aurora uses two parameter groups; a cluster parameter group and an instance parameter group. You may have created a cluster parameter group which you are trying to assign to the instance, or vise versa.

Create both a new cluster parameter group and a new instance parameter group. Then edit the cluster to set the cluster parameter group. Then you have to edit each of the instances in the cluster and set the instance parameter group.

Once you've updated the cluster and instances, check if the parameter groups are "in sync" or not by looking at the details (should show up next to where the parameter group is listed). If they are not in sync then you have to reboot the instance.