Log level for postgres cluster

Hey all,

I set up a small postgres cluster via flyctl today. I’ve not really done much with it but have noticed that so far that application has generated about 500mb of outbound data (over about 12 hours).

It seems to me that this data is the logs being put out by the app, it’s not clear what else it could be. There are quite a lot of logs and it’s almost entirely from stolon keeper.

Is there a way to change the log level from INFO to WARN? Looking at the stolon repo it seems I should be able to control this with the STKEEPER_LOG_LEVEL env var:

As I don’t have a fly.toml file for it I tried setting it with a secret as a work-around. This doesn’t seem to work though.



This is probably not log level related. I don’t believe logs are included in your data transfer. It’s probably replication using the data, there is quite a lot of traffic between postgres vms with stolon.

That said, changing the log level would be pretty handy. You can experiment with those env vars. You have to pull down the app config, edit it, and then redeploy:

  • Make a directory like my-db, then cd my-db
  • fly config save -a <database-app-name>
  • Set [env] variables in fly.toml
  • fly image show, save the tag value of the current image
  • fly deploy -i flyio/postgres:<tag>.

Hey - thanks for the quick reply and good to know re the logs/billing.

I’m surprised at the amount of traffic to be honest - so far I’ve just written a small amount of data into it (well under 1mb) and created a schema. I assumed it was the logs as it was the only thing that seemed like it could be large enough.

Great tip with fly config, thanks for that :slight_smile:, I was wondering if it was possible to do that. I will have a play and report back here in case others are interested.

@tdfirth came across this post as we are seeing the same in our logs, stolon does a ton of logging, and we’d like to cut down if possible to cut through the noise. I’ve been unsuccessful in my attempts to cut down on the logging level, were you able to change the logging level or figure out a way to cut down on the logs?