r/adventofcode • u/topaz2078 (AoC creator) • Dec 01 '20
2020 Day 1 Unlock Crash - Postmortem
Guess what happens if your servers have a finite amount of memory, no limit to the number of worker processes, and way, way more simultaneous incoming requests than you were predicting?
That's right, all of the servers in the pool run out of memory at the same time. Then, they all stop responding completely. Then, because it's 2020, AWS's "force stop" command takes 3-4 minutes to force a stop.
Root cause: 2020.
Solution: Resize instances to much larger instances after the unlock traffic dies down a bit.
Because of the outage, I'm cancelling leaderboard points for both parts of 2020 Day 1. Sorry to those that got on the leaderboard!
38
u/emlun Dec 01 '20 edited Dec 01 '20
Frankly, I was delighted that it came back up quite quickly after all. I imagine there's a very concentrated demand spike that very few even big business systems would happily cope with. You're doing fine. :)
Oh right, I haven't sponsored yet this year. Just gimme a minute...
23
u/estomagordo Dec 01 '20
Congrats on being popular!
I think this community is one that certainly understands how and why these things happen. All the best.
Sidenote: Will private leaderboard points stand?
19
u/jonathan_paulson Dec 01 '20
I'm impressed you got it back up so quickly! It's great that adventofcode is so popular :) How many simultaneous requests were there?
11
u/wace001 Dec 01 '20
Is it OK to ask what kind of AWS servers it is? Just curious. Also, do you have any idea about the number of simultaneous requests at the unlock? Would just be super interesting as a case study of crazy traffic spike.
244
u/alienth Dec 01 '20 edited Dec 01 '20
This exact same thing has happened to us at reddit. Don't feel bad! And thanks for continuing to run this great event :)
also rip my first ever leaderboard position I'll never forget you.
60
u/_MeanMF_ Dec 01 '20
Congratulations on being super popular! And thanks for the transparency and quick update.
41
u/wizardofrobots Dec 01 '20
This story would have been an excellent intro for a 2017 AoC problem where we go into the CPU to repair the printer.
"...Then, because it's 2017, AWS's "force stop" command takes 3-4 minutes to force a stop. You decide to save u/topaz2078 some headache and free up some memory by killing processes currently waiting for the scheduler (your puzzle input). You arrive at the scheduler and..."
14
u/Fruloops Dec 01 '20
Mate, don't worry about it. You're doing an amazing job with these puzzles and hiccups like these are always going to happen. Keep up the good work, you make December amazing for so many people <3
14
u/didzisk Dec 01 '20
We did it, Reddit!
(I mean, crashed AoC)
13
u/jwoLondon Dec 01 '20
Time of the first 100 one-star submissions shows when it all started going pear shaped.
https://raw.githubusercontent.com/jwoLondon/adventOfCode/master/images/aocServerCrash2020.png
9
u/trainrex Dec 01 '20
<3 Thanks Eric!
9
u/floorislava_ Dec 01 '20
A lot of people seem to have automated the process of accessing the site.
2
u/wizardofrobots Dec 01 '20
I thought the solution would be to limit the number of worker processes? Can someone clue me in?
5
u/mariotacke Dec 01 '20
Exceptionally fast response, thanks for doing this!
5
u/Kriegersaurusrex Dec 01 '20
Thanks for answering the call to keep your servers up past midnight!
5
u/masssy Dec 01 '20
As much as it sucks that it crashed I'm quite happy with my sleep in today.
No score lost!!!
4
u/allergic2Luxembourg Dec 01 '20
Thanks so much for getting it back working!
4
u/recurrence Dec 01 '20
Not knowing the details of how this is architected... in recent years I've generally gotten around this problem of deploying services with momentary bursts like this on AWS Lambda. When clients have people with 80 million plus followers re-tweet them... ... lambda has performed much better than my autoscaling clusters (if you can keep the roundtrip time low enough to not exceed concurrency limits).
7
u/benbradley Dec 01 '20
In 2020, the whole Internet relies on AWS.
3
u/ALLCAPSON Dec 01 '20
Thanks Eric!
3
u/Mivaro Dec 01 '20
For 2019, less then 10.000 people completed day1 (I assume that is up until today, give or take). This year the counter is over 16.000 already (stats page). I would guesstimate traffic is at least double from last year. Luckily for the servers and the AoC AWS account, participation drops of rather rapidly after day 1.
2
u/multytudes Dec 01 '20
Good I did not wake up at 4 am this morning 😆
2
u/Markavian Dec 01 '20
What kind of traffic did you see in the first 10 minutes? Are you able to share to the AWS CloudWatch metrics for the period? (Tune to 1 second resolution to see the per/second spike). I build highly available infrastructure that takes very bursty network traffic, would be interesting to see what the loading was for day 1.
2
u/MadLadJackChurchill Dec 01 '20
Here's my dumbass thinking that is the first puzzle of the day until I got halfway through the Text haha. I failed before doing the first problem.RIP
2
u/aardvark1231 Dec 01 '20
Thank you for all your hard work and dedication. You bring much joy to all of us programmers every year. :)
2
u/thedjotaku Dec 01 '20
Sad that today was the one day I could do the problems before heading off to work (best chance at getting a decent leaderboard spot). BUT, what a "great" problem for you to have - too popular!
2
u/Sw429 Dec 01 '20
Is this why I was getting 503s initially?
0
u/MiloBem Dec 01 '20
:(
.----------------------.| We'll be right back! |'----------------------'0
u/FfEraa Dec 01 '20
still out for me though
2
u/mebeim Dec 01 '20
Would you be willing to post a graph of the num of requests / users / bandwidth / resource usage on AoC servers? That'd be so cool to see!
1
u/nora-sch Dec 01 '20
even if the leaderboard points are cancelled I would like to know mine...
1
u/101donutman Dec 01 '20
Wait, im confused. does the ldb positions get reset? like the points all get removed and then only newer submissions get scored?
-2
u/[deleted] Dec 01 '20
Nooooo, but we all faced the same challenge, getting your answer submitted is part of the leaderboard challenge. Like in Jeopardy where knowing when to press the button is as important as knowing what the right answer is. I mean i'm not on the leaderboard, but it seems a shame to remove those points.
Btw I was impressed with how fast the incident was concluded, you're putting on an awesome thing here.
-6
u/aceshades Dec 01 '20
With regard to the Solution -- maybe a limit to the number of worker processes is a good idea?
-4
u/pred Dec 01 '20 edited Dec 01 '20
Aww, part two as well? Judging by the times, that one had a pretty level playing field, with most people being able to get in at the same time. (Really, I'm just sad that this was by far the fastest I've ever been in AoC, so I was really hyped about that and it would be a bit disheartening if that result just disappeared.)
Anyway, great job on getting the site back up again so fast! System administrators worldwide could learn something from that!
-5
u/[deleted] Dec 01 '20
I was confused tbh
But in the end it gave me time to google to figure out the position so win..?
0
u/[deleted] Dec 02 '20
[deleted] — view deleted comment