Hide and Seek Cache
-
I recently helped a customer move a self-hosted web application to a new server, also self-hosted. With a few tweaks, it was working but a couple of pages needed additional tweaking. A week later and we replaced 2 files. Suddenly, the app started crashing on those 2 pages only...all other pages worked flawlessly.
My first guess was incorrect...it was not a permissions issue. (30 minutes wasted)
My second guess was also incorrect...it was not a configuration issue. (20 minutes wasted)
My third guess was correct, but logically, it didn't make sense at the time, so I talked myself out of it.Of course, there was only a generic 500 to start with, so walked a tech through enabling detailed errors.
We finally discovered that an include file used by 80% of the pages in the app, had somehow gone missing. The unchanged files apparently pulled it from cache while the changed files triggered a new request. Doh!
Confession: This is the last Classic ASP app I have running in the wild. It is down to 1 customer and not worth the effort of a rewrite. That said, it actually reminds me a lot of blazor, mixing tags and code. Also, it says alot that this app has mostly remained untouched for years, but still gets the job done. (earns money)
-
Caching is always great to deal with when it comes to debugging. Always so helpful it is, serving out valid, stale requests that don't reflect what is actually happening on the ground.