I'm trying to find a way to keep Stellar disk usage in check. I only care about the last 24 hours or so of transactions and don't want to over-provision the instance

I started a docker container using the quick start

docker run --rm -it -p "8000:8000" -v "/home/ec2-user/stellar:/opt/stellar" --name stellar stellar/quickstart --pubnet

and updated ~/stellar/core/etc/stellar-core.cfg, adding these lines


which after reading this question leads me to believe it will constrain the disk, yet the disk usage of my 30GB disk continues to climb until it consumes 100%.

disk usage

The reset to 25% usage is after I kill the container and delete ~/stellar

I've also tried

docker exec 6 stellar-core http-command maintenance

but nothing good happens with disk, it just reports No work performed

What am I missing?

  • Maybe postgres is not freeing the space? Not a postgres expert but isn't there a cleanup/maintenance command, too? Also do you have a cursor set curl localhost:11626/getcursor? It's a common set up to have a horizon cursor, in this case core will not free the resources that horizon (or whatever other app with cursor) didn't fetch yet.
    – sui
    Jun 11, 2019 at 14:01
  • It appears there is a cursor (I think). On a newly reset quickstart container: {"cursors":[{"cursor":24563082,"id":"HORIZON"}]}. Not sure whether that is expected or not.
    – troy ounce
    Jun 28, 2019 at 5:17

1 Answer 1


stellar-core maintenance doesn't actually free disc space. Disc space is freed by postgres's vacuum daemon (which clears data that's been logically deleted). perhaps your PG isnt running periodical vacuum? you can also issue manual, 'vacuum full' to clear the space, but you'll need to stop the core, first.

  • Ah! The default image does have settings autovacuum commented out. Have enabled track_counts = on and autovacuum = on. Will report back
    – troy ounce
    Jun 12, 2019 at 0:58
  • Unfortunately didn't work and disk went to 100% again. Assuming vacuum can't work with full disk so will let it climb to 50% and then see if I can manually force a postgres vacuum
    – troy ounce
    Jun 28, 2019 at 2:41
  • Tried a direct command like this docker exec --interactive 36 psql -d core -U stellar -W - it prompts for a password which is accepted (it doesn't give an auth fail error) but then the cursor goes to the next line and nothing happens. Manual VACUUM attempt defeated.
    – troy ounce
    Jul 5, 2019 at 5:29
  • this isnt how you issue manual vacuum. you need to connec to the db, which is likely postgres) and issue "vaccum full;" connecting to the db is often done with a client like psql. which db are you running?
    – FuzzyAmi
    Jul 6, 2019 at 6:21
  • yes - using postgres which comes from the stellar quick start stack but it is inside the docker container, hence was trying to execute psql via docker exec. Got this command to work in the today: docker exec -it dc vacuumdb --host= --port=5432 --dbname=core --username=stellar --analyze --verbose --full but disk consumption was unchanged afterward
    – troy ounce
    Jul 18, 2019 at 1:00

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.