ident & loc data —
nats sub -s nats://TOKEN@a15d11836d0644f6da0d09cbd81fae4f-949e37ea0352e6ad.elb.us-west-2.amazonaws.com:4222 "plane.ident.annotated"
nats sub -s nats://TOKEN@a15d11836d0644f6da0d09cbd81fae4f-949e37ea0352e6ad.elb.us-west-2.amazonaws.com:4222 "plane.loc.annotated"
How to get echo to work on Dockerfile to debug
--progress=plain --no-cache
docker build --progress=plain --no-cache -t nats-annotator .
How to kill docker runs
nats.errors.SlowConsumerError: nats: slow consumer, messages dropped subject
A slow consumer is a subscriber that cannot keep up with the message flow delivered from the NATS server. This is a common case in distributed systems because it is often easier to generate data than it is to process it. When consumers cannot process data fast enough, back pressure is applied to the rest of the system. NATS has mechanisms to reduce this back pressure.
Attempt 1: clearing messages in jetstream → works temporarily
nats -s nats://TOKEN@a15d11836d0644f6da0d09cbd81fae4f-949e37ea0352e6ad.elb.us-west-2.amazonaws.com:4222 stream ls
nats -s nats://TOKEN@a15d11836d0644f6da0d09cbd81fae4f-949e37ea0352e6ad.elb.us-west-2.amazonaws.com:4222 stream purge [STREAM_NAME] --keep [MSG_TO_KEEP]
Attempt 2:
sudo git clone <https://aur.archlinux.org/yay.git
>Attempt 3: successfully installed nats
Identifying this issue
Planes not showing up in front end → long/lat information not being passed → annotator out of space
in ec2 command line
sudo du -h --max-depth=1
too see which files on the machine are taking up the most space
if old Docker images are taking too much space, do: docker system prune -a -f
——— it’s important do this from time to time!
if still not enough space cleared (lets clear completley and restart docker)
# from [<https://stackoverflow.com/questions/46672001/is-it-safe-to-clean-docker-overlay2>](<https://stackoverflow.com/questions/46672001/is-it-safe-to-clean-docker-overlay2>)
# danger, read the entire text around this code before running
# you will lose data
sudo -s
systemctl stop docker
rm -rf /var/lib/docker
systemctl start docker
exit
sudo du -h --max-depth=1
/var/lib/dockerrestart
sudo du -h --max-depth=1 /var/lib/docker
New Process to build/run on AWS:
general var/lib/docker/overlay2 size at different points:
init (after docker reset) = 0
after image build = 422M
after docker run = 1.8G