The Daily Parker

Politics, Weather, Photography, and the Dog

New Weather Now update

I've added a bunch of small but useful features to Weather Now:

  • Users can now set their preferred measurement system (metric, Imperial, default) and time/date formats.
  • On Nearby Weather and Nearby Places, users can double-click the map to re-center and load new info.
  • Moved the Weather Score column on lists to increase usability.
  • Tweaked the Weather Score formula.
  • Several other bug fixes and feature tweaks.

So if you set up a profile, which you can do simply by logging in with any Microsoft ID, you can customize the app in a bunch of ways. (There's no cost, but I'd appreciate it if you'd subscribe on Patreon.)

Have fun with it. I'm probably going to slow down on Weather Now updates for a bit as I change focus to replacing BlogEngine.NET.

In just a few hours, though, I'm going to a work conference in Nashville, Tenn., where I will have the opportunity to visit at least three breweries. Stay tuned!

Why The Daily Parker costs so much

A longtime Daily Parker reader asked this about yesterday's post:

"The Daily Parker costs $4.87 per day" -- I'm really hoping that's a misprint, because that's almost $150 a month, which is ten times what I pay for my web hosting package which comes with unlimited domains, a full email service (IMAP+SMTP over TLS), click-to-install WordPress and MySQL database creation, SSH access to the back-end Linux machine, and excellent customer support.

Also -- and I *really* hate to say this to a fellow IT professional -- your web site often seems rather slow. So much so that I'd built a mental image of it running on an old PC in a corner of your apartment, and I'd put the slow response times down to the latency of a hard disk spinning up from idle.

So, he's not wrong: The Daily Parker right now is slow and buggy. And expensive*. (Ironically, when it was literally running on a PC in the corner of my apartment prior to 2013, it ran like Jesse Owens.)

Sherman, set the Wayback Machine to October 2015, when I deployed the current version of this blog. From the blog's separation from braverman.org in 2005 until 2015, it ran on DasBlog, a .NET 1.1 blog engine that worked most of the time and had a few features I liked. I dragged it kicking and screaming up to .NET 2.0 and later .NET 4.0, and there it stayed.

After 10 years and dozens of tweaks, I decided to modernize by moving to BlogEngine.NET, which I also forked and modified. This engine runs on .NET 4.8, which I had to shoehorn into an Azure App Service when Cloud Services went away a couple of years ago. BlogEngine.NET had modest performance problems when it had a nice virtual machine all to itself, as Cloud Services weren't too different from on-premises hardware. But Azure App Services don't quite work the same way, such that many of the performance optimizations in the BlogEngine.NET code actually cause performance headaches in App Services. For example, at app start, the engine loads the entire blog history into memory, because in 2007, when the project began, memory was fast and disks were slow. (NB: The Daily Parker has over 9,700 posts spanning 27 years.) Also, the code runs entirely synchronously, so under load it spins up more and more threads until it just collapses from exhaustion.

So here we are: running a very old blog engine on a nearing-end-of-life version of .NET that everyone is tired of.

But, aha! There is a solution, which I've been kicking around for almost as long as I've had a blog, and which I finally have the skills and time to work on. I'll simply build my own. It'll be idiosyncratic, sure, but it'll be fast and it'll be cool.

Or maybe I'll go back to DasBlog, now that someone has rebuilt it in .NET Core.

Nah. I'm going to write my own. Target date: October 15th, ten years after I released this version.

* It's actually now around $3.34 per day after a Microsoft Azure pricing change on February 12th which just showed up in the cost management tool today. The costs break down as follows: App Service type B2, $2.49; storage (media and event log), 52¢; database (serverless type B), 33¢. So, around $100 per month.

Wednesday afternoon notes

I'm just noting a few things and moving on with my day:

I'm planning to wrap up a new release of Weather Now this evening, too. I'll post snow photos when I do.

Newsletter widget removed

On Thursday I merged in the latest Github code from the BlogEngine.NET project and published it to Azure. I didn't realize at the time that the update contained a new widget called "newsletter" that let anyone sign up to receive a notification for each post on the blog.

By the time I got my weekly email report with its hundreds of bounces, apparently every robot from here to Vladivostok had signed up.

So annoying. Well, I now know the widget code a lot better, and I've killed the thing. I hope my bounce rate drops back to zero.

If you want to know when I post something, there's an RSS feed to which you're welcome to subscribe.

Troubleshooting an upgrade conflict

After upgrading to the Azure SDK 2.8.1 yesterday, I'm unable to debug this application locally without an uncomfortable contortion.

The application is a Microsoft ASP.NET MVC website set up to run using IIS Express. It uses some Azure components, in particular the evil msshrtmi.dll that has caused so many versioning headaches in the past.

The symptoms are these: when starting to debug the application in Visual Studio 2015, the application compiles but immediately causes a system toast message to appear that announces "One or more errors occurred running IIS Express." Clicking there for more information opens this unhelpful dialog box:

The log file contains this single line:

Failed to register URL "http://localhost:64079/" for site "BlogEngine.NET" application "/". Error description: Access is denied. (0x80070005)

The other links point to articles on the MSKB, one of which is out of date and the other of which is probably irrelevant (because I'm running VS2015 as administrator).

I'll get to those in a second, because in reviewing the Windows application and system logs, I found some suspicious events that seem related.

In the Application log, there are multiple error events with IDs 2269 and 2276 that start after I installed the Azure SDK update. Event 2269 is: "The worker process for app pool 'Clr4IntegratedAppPool', PID='11000', failed to initialize the http.sys communication when asked to start processing http requests and therefore will be considered ill by W3SVC and terminated. The data field contains the error number." The error number is 0x80070005 with another code 13780. Event 2271 is just a cascading error, "The worker process failed to initialize correctly and therefore could not be started."

Googling Event 2269 yields quite a few articles but they seem to diverge from my problem very quickly. I'll plow through those in a minute.

The other interesting event is in the System log. Whenever I attempt to debug the app, Event 15005 appears: "Unable to bind to the underlying transport for [::]:64079. The IP Listen-Only list may contain a reference to an interface which may not exist on this machine. The data field contains the error number."

Well, that's a lot more interesting. And it led directly to this article, which led to me looking at what is actually listening for what, which led me to changing the port in my debugger from 64079 to 49156. (I could see that 49156 was free by running netstat -aon.)

Sigh. I have no idea why upgrading to the latest Azure SDK would hose an IIS Express port, but even more than that, I am not entirely sure whether blaming the SDK is itself post hoc reasoning. But like so many things in systems this complex, I have now fixed the symptoms, and will go on with my life. Such a time suck, though.

Upgrade headache

I just upgraded my system to the Azure SDK 2.8.1, released earlier today, and also merged the latest code from the BlogEngine.NET master repo into my custom codebase. Do you see where I'm heading?

Once I "solved" the version issue with msshrtmi.dll (a perennial bête noir [not to be confused with this bête noir]), then published the changes, and promptly killed the blog for an hour.

It looks better now, but I'm still having trouble debugging it locally. Tomorrow, after I finish fixing a bug for work, I'll figure out why.

Milestones

This post has a personal and a technical significance.

Personally: exactly 10,000 days ago, I was graduated from high school, at about this time of day.

Technically: The new blog engine let me pre-post this several days ahead, something the old blog engine thought it could do but never quite succeeded.

That is all.