Your question took too long on AWS ELB V 0.36.4

I have setup Metabase over AWS ELB, as suggested via doc and used default VPC and other settings.
Only change I made is for security ( added shh key) and username/password for the database.

I have checked few threads here wrt Your question took too long but its supposed to be solved but in my case, that’s not happening.
I have checked inside the code & inside the container and realized elasticbeanstalk-nginx-docker-proxy.conf doesn’t contain any info about
proxy_connect_timeout 600;
proxy_send_timeout 600;
proxy_read_timeout 600;
send_timeout 600;

Load balancer timeout is done and tested, its something to do with metabase nginx but not sure how to fix?
Any suggestion ?

Hi @buntha
How long time does it take for your questions to timeout?
Check your browser developer Network-tab, the cancelled request will contain response headers, which might point you to the culprit.
The thread you’re referencing is not “solved”. If your config doesn’t contain timeout configurations, then it’s just using the default Nginx, which is 60 seconds, so if you’re having problems with Nginx at 60 seconds, then add the extra configuration options.

@flamber
it exactly throws the error @ 60 second.
So when it comes to adding extra configuration, how should I do ?
Should I login to EC2 instance and then make ammend, if yes where ?
And then how should I restart the server?

Or I simply get the zip file offline, make the change inside metabase-setup.sh and then zip it back and create new Elasticbean environment ?

@buntha The second option, so the information is saved when you restart the instance.

I tried metabase-setup.sh and made following change -
location / {
proxy_pass http://docker;
proxy_http_version 1.1;

    proxy_set_header    Connection            $connection_upgrade;
    proxy_set_header    Upgrade                $http_upgrade;
    proxy_set_header    Host                $host;
    proxy_set_header    X-Real-IP            $remote_addr;
    proxy_set_header    X-Forwarded-For        $proxy_add_x_forwarded_for;
    proxy_connect_timeout 1200;
    proxy_send_timeout 1200;
    proxy_read_timeout 1200;
    send_timeout 1200;
}

Do I need to make any other change? As I tried but it still didn’t take the changes inside aws ec2

@buntha I would highly recommend that you read through this thread again: Metabase timeout configuration
And then check the PR that was created to see what changes needs to be made.

Based on this Pr , change is exactly the same what I did, but Elasticbean app is somehow not picking that up. will retry.

@buntha Upload your ZIP configuration somewhere and post a link to it. That’s the configuration that creates the Nginx file, so I don’t see why it wouldn’t work unless it’s applied incorrectly. Otherwise there shouldn’t be any configuration at all in Nginx besides the defaults.
You can check the EBS log, when you create the instance to check for any errors.

@flamber here is the link

Technically it should really work but seems like somehow elasticbeanstalk-nginx-docker-proxy.conf overwritten with old info :frowning:

brower network
Failed to load resource: the server responded with a status of 504 (Gateway Time-out)

@buntha But how can it be overwritten with “old info”, when you’re creating a new instance with the new configuration?
When you look in the instance, what configuration do you see in elasticbeanstalk-nginx-docker-proxy.conf ?
Did you check the EBS log?

And 504 doesn’t necessarily means that the response comes from Nginx - you need to check the browser developer Network-tab to see the headers.

really don’t know why but irrespective of how many times i upload the zip, the conf file is still unchanged,

Only reason i can imagine is somehow AWS is not accepting the zip I am uploading…

But I found some interesting stuff inside log,
2020-09-05 18:41:44,568 [INFO] -----------------------Starting build-----------------------
2020-09-05 18:41:44,575 [INFO] Running configSets: Infra-EmbeddedPostBuild
2020-09-05 18:41:44,579 [INFO] Running configSet Infra-EmbeddedPostBuild
2020-09-05 18:41:44,582 [INFO] Running config postbuild_0_abhishekpr
2020-09-05 18:41:44,818 [ERROR] Command 01_server_https (.ebextensions/metabase_config/metabase-setup.sh server_https) failed
2020-09-05 18:41:44,818 [INFO] ignoreErrors set to true, continuing build
2020-09-05 18:41:45,056 [ERROR] Command 02_log_x_real_ip (.ebextensions/metabase_config/metabase-setup.sh log_x_real_ip) failed
2020-09-05 18:41:45,056 [INFO] ignoreErrors set to true, continuing build
2020-09-05 18:41:45,294 [INFO] Test failed with code 1
2020-09-05 18:41:45,528 [INFO] Test failed with code 1

Why server_https/log_x_real_ip failed , because after that it kicks on install_papertrail , so am I looosing everything because of this failure ?
Is there any way to know why it failed.

@buntha I don’t know why it’s failing. You would need to add debug points throughout the script, so you can see which parts it might succeed on.
Try manually creating the Nginx config on the server.
The only thing similar between those two commands is cd /etc/nginx/sites-available which was noticed in the other thread: Metabase timeout configuration

There’s thousands of Metabase instances on EBS, so I’m not sure why you’re having problems, but it seems like it’s something specific to your setup.

For now, I manually edited the conf inside instance and restarted the nginx. It atleast working , I can wait for another version of metabase, to see what happens.