January 14, 2022
š Iām trying the idea of morning pages, where I write three pages in the morning of whateverās on my mind. Itās mostly for me, but Iām publishing them too because why not.
Good morning! Iām writing this from a nice little cabin in New Hampshire.
I woke up this morning to several emails about the Google Sheets API that I created, opensheet, not working.
I couldnāt figure out why it just wasnāt loading, but I triggered a re-deployment of its servers, and it magically solved itself.
Looking at the monitoring graphs, it looks like the API was down from 1am to shortly before 8am, when I woke up and got it working again.
This is also maybe the second time that Iāve woken up to emails about opensheet having gone down overnight, which isnāt a good look at all. The API gets a substantial amount of traffic at this point (unfortunately my monitoring isnāt good enough at the moment to know exactly how much), so I feel really bad about taking down peopleās apps. I want this to be something people can rely on.
I migrated opensheetās servers from Vercel to Railway a couple weeks ago, since I was running into Vercelās free tier limits and didnāt want to pay for a Vercel account when I donāt really have any other projects on there.
So I moved to Railway, where I already had some apps going and I could pay by how many server resources I had.
But Iāve had repeated issues with Railway āĀ some being my fault, and some being inexplicable.
Whenever I write code that causes an error, the entire Node.js server on Railway crashes. This wasnāt an issue on Vercel, since the code is run across tons of tiny servers, so the individual server that crashed is just taken out of commission and rebooted.
But on Railway, there is only one server running, so one error or exception brings down the whole thing. This helped me catch a couple edge cases in my code and fix them, but it also led to me waking up sometimes to the server having crashed and me needing to manually restart it.
I got around this by having my server swallow errors and not crash, but that didnāt feel like a great solution either.
And then thereāve been problems that I canāt figure out. Sometimes the server just goes down, and having Railway re-deploy the same code fixes the same problem. That seems too unstable of a foundation for this API, and for my own sanity.
So I think Iām going to move the hosting of opensheet to Cloudflare Workers. The platform seems super robust, and itās also super cheap to accept tons of requests.
Plus, since I changed the URL for opensheet to one that I own (opensheet.elk.sh
), I can switch the servers behind it from Railway to Cloudflare Workers without any disruption.
Itās a little embarrassing to make two hosting switches so quickly, but if it helps the API be more stable, itās all worth it.
Inspired by Dan Liu, I have a loose goal of closing the three Apple Watch rings (Move, Exercise, and Stand) for every day of 2022.
Itās a loose goal because I donāt know if Iāll be able to do it, but Iāve noticed in past years that having the streak really works for me. A bit of a year ago, I broke a 91-day streak by missing my Activity goal by 5 calories, and that was heartbreaking.
I thought I was already a goner less than 2 weeks into the new year yesterday. I was stopped at an Aldi in New Hampshire on the way to this cabin, and I noticed that my watch was dead. I thought my Stand ring couldnāt be closed anymore for the day.
But when I arrived and charged my watch, I realized that I could comfortably close my stand ring!
That luck being on my side, combined with a half-hour walk an a 20-minute āstair stepperā workout (going up and down the stairs inside the cabin), was enough calories burned to close my Move ring.
Allās well, and I live to see another day on the goal for this year. Catch me doing a lot of frantic jumping jacks or running in place at 11pm for the rest of 2022.