Metabase on AWS runs out of disk space

We are running on AWS with the standard configuration.

But every month or so we get an out of space error, due to logs growing. I don’t see a way to access it and delete it, so each time I need to rebuild the environment.

“No space left on device. For more detail, check /var/log/eb-activity.log using console or EB CLI.”

Anyone know how to clean up the logs?

Does this help any? Under Configuring Logging Level Metabase’s documentation says it uses Log4j that’s “completely configurable”. SSH-ing the AWS EB EC2 instance where the Metabase web-server resides it would appear possible to use the CLI to do quite a bit.

The problem is i can’t SSH in because when the deployment to AWS happens, it doesn’t create any credentials for logging in. Maybe it’s just my inexperience as to how to add them later, but my understanding was I’d have to recreate the EC2 instance to add credentials.

1 Like

The credentials are your keypair you specified at AWS EB’s configuration, and the EC2’s Public IP.

Maybe this will help (if you’re coming in from a Windows machine): Connecting to Your Linux Instance from Windows Using PuTTY

If you’re not coming in from a Windows machine there are guides out there for sure. AWS’s documentation isn’t so easy to find or so clear (at least to a noob like me) so I had to use several to figure this out.

In general you’re going to need the keypair file you specified (and downloaded for safekeeping hopefully). That’s your credentials, and for Windows they’ve got to be translated from *.pem to *.pkk for PuTTY to read. And you’ll need to go to your EC2 Instance panel and copy the Public IP to get in as “ec2-user@YourEC2PublicIP” and take it from there.

Tested it out myself just now for the very first time on my AWS EB EC2 Metabase environment and I got in no problem in under a minute!

And if you figure out how to clear the logs from there kindly post how you did it! Maybe somebody out there has an easier way but I kind of figure this is the direct route.

1 Like

I think the challenge is that in some setups that key-pair isn’t going to work by default. I’m also fully willing to admit to inexperience with AWS on this one, but I just wasted a whole day on this too. :slight_smile:

At first, I kept expanding the storage and today I tried rebuilding the whole environment with a new key-pair and so far I don’t know if that has helped me much…lol. We’ll see. I’m still fixing things up.

I’ll post back if I fix my setup correctly with any tips.

I have been running Metabase on AWS for almost a year without any issue on my side. It gets down once in a while but I assume that’s maintenance since it’s only for a couple minutes.

I used this tutorial to build the environment, if that helps: https://www.metabase.com/docs/latest/operations-guide/running-metabase-on-elastic-beanstalk.html

Haven’t done anything particular to the logging system.