Maaah! How I Killed My Site With a Goat GIF

This video features Meagen Voss from Wagtail CMS 2023.

Maaah! How I Killed My Site With a Goat GIF
0:06:13
Published July 14, 2023
105 views

Lightning Talk: Maaah! How I Killed My Site With a Goat GIF by Meagen Voss @ Wagtail

The 5th annual Python Web Conf (#PWC2023) inspired attendees to use technology for good. The conference attracted 315 attendees from over 30 countries across 15 time zones. The highly engaging format featured 70 speakers, 5 tracks (including 64 talks and 5 tutorials) and took place virtually on March 13-17, 2023 on LoudSwarm by Six Feet Up.

More information about the conference can be found at: https://2023.pythonwebconf.com

Summary

Meagen Voss describes how adding an animated GIF of goats to her blog on a 512 MB DigitalOcean server caused her site to break, with parts of the backend and frontend failing. She restored the site from a droplet backup, then reproduced the failure to investigate; she learned that an animated GIF’s frame rate, not just its file size, can strain a server, especially one with little memory. She recommends keeping backups, avoiding undersized servers, and considering video or no animation instead of GIFs.

Key takeaways

  • A small GIF file can still cause trouble: its frame rate can add to the processing load.
  • Limited server memory can make resource-intensive media more likely to cause failures.
  • A tested, restorable backup can quickly bring a broken site back online.
  • Consider replacing animated GIFs with video or leaving animation out altogether.

Summarised automatically from the transcript.

Transcript

913 words · auto-generated · en Show

Automatically transcribed, so expect mistakes in names and technical terms.

0:04

Hi, I'm Megan. Um I work for a UK agency called Torchbox. We're the creators of a Python-powered CMS called Wagtail. And I'm not going to talk to you about Wagtail so much today as how I personally broke my own website in a very um in a way where I learned some lessons. So, you know, that's my social media. Feel free to follow me and come check check the things out that I do. Anyway, this all started out when I wrote a blog about testing your Python code. So if you have not uh been through uh Harry J. W. Percival 's very wonderful book, Test-Driven Development with

0:50

Python. uh then you probably don't know about the testing goat. Uh the testing goat is this character that he uses to kind of scare uh menacingly at you uh if you do not test your code thoroughly. And uh it amused me to the point where when I wrote this blog post, I'm like, you know what? I wanna I want to include some GOAT chips in this blog post. And so I went and found this chip of two goats jauntily strutting down the street doing their goat thing on a goat afternoon and decided, hey, I want to put this thing in my blog post. Now let's talk about the specs of the site real quick. So this site is my personal site, Meganboss.

1:35

com. At the time that this whole thing happened, I was running Wagtail 2. 13. And this site is hosted on a digital ocean droplet. I was running Ubuntu with Gunicorn and Nginx And this number will become relevant later on. I was on a very small amount of memory droplet, only 512 megs. uh and also had uh 10 gigs of solid state memory like solid state drive on on the server there. So like these these specs are are important to remember. So when I put the post together, I added the goat gif. Went through, double-checked on my grammar, things like that, and hit

2:25

publish. And this happened. My site just went kabalooey. It was one of the most complex uh collection of errors I have ever seen. I had parts of my backend were working properly, other parts were just gone. The front end was just a complete mess. Uh and it was like the the logs were so tangled. I was sitting here going, like, I don't think there I can find the error in here even if I tried. Fortunately, and this is a lesson again that backups are a great thing to have. I had a backup of my Digital Ocean droplet, and that is totally worth the money for anybody who is hosting on DigitalOcean.

3:14

And I was like, you know what? Honestly, it would take me less time to rewrite the blog post. uh than it would to try and figure out where this error is originating from. So I went ahead and put the backup together And got my site back up and running. Everything was functioning. Everything looked good. I was minus one blog post, but hey, I could rewrite that pretty quickly. And so, but because I'm the type of person who is just absolutely curious, and also because I now knew that my backup worked. I'm like, you know what? I just want to see, did I really, really destroy my site, like my production site this badly with just this image and why?

4:00

So I uploaded it again. And I blew up my sight again because that's the type of person that I am. And so The lessons that I got from this when I started talking to other people in the community and other people at Torchbox about like, hey, why does this thing happen? Like you know, um what what am I running into here? Um and this is when I started to learn that, you know, the GIF format is actually pretty old. And it they can be chaos engines on the back end of servers. Honestly, these things are the like the sysadmins. I I talked to say that, you know, GIFs can be the bane of their existence sometime

4:49

because ultimately it's not just the size of the file that matters. Uh when you post a GIF to a website or a blog post, the frame rate, how fast the GIF is moving, also matters because I was looking at things like, you know, this file is Small enough that it shouldn't be causing any problems on my blog. But ultimately it turned out that the frame rate of those goats strutting down the alleyway was what was causing some problems On top of that, I also had a very, very small amount of memory. It was very tiny. So don't cheap out on your memory. Also consider converting your gifts to something else. Many people replace animated GIFs with videos for faster loading pages.

5:36

Or just consider not using them whatsoever, as this person, Paul Bacchus, suggests on his Gifts Must Die blog. So All right, that's how I killed my website with a goat shift and resurrected it. Please come check out Wagtail. It's a great piece of software, awesome content management system If you have any questions about Wagtail or questions about how I destroyed my site and brought it back, feel free to hit me up on Slack. Thanks so much, everybody.

Questions this talk answers

How did she get her site back after the GIF broke it?

She restored a DigitalOcean droplet backup, which brought the site back to a working state; she then rewrote the missing blog post. The backup made recovery quicker than tracing the tangled errors.

Discussed at 3:14

Why can an animated GIF crash a website even if the file is small?

The GIF’s frame rate can make it costly to process, so file size alone doesn’t tell you how much server work it may cause. The risk was compounded by her server having only 512 MB of memory.

Discussed at 4:49

How can I prevent animated GIFs from causing server problems?

Use a server with more memory, and consider replacing animated GIFs with video or not using them. The speaker notes that many people use video instead for faster-loading pages.

Discussed at 4:49

Presenters

Tutorial Creator

Wagtail CMS

Note: We understand that names change, people change, and bodies change. We respect each individual's journey and privacy. If you have any concerns about a video or need us to remove content, please don't hesitate to contact us. We will handle your request with care and promptly address any issues.

More videos by Meagen Voss

More videos from Wagtail CMS