Troubleshooting mismatched anonymous define

Published: July 9, 2021

If you’re reading this post you’re probably troubleshooting an error like this:

(index):10 Uncaught Error: Mismatched anonymous define() module: function(){return wr}
    at makeError (require.min.js:formatted:86)
    at intakeDefines (require.min.js:formatted:713)
    at require.min.js:formatted:835
    at nrWrapper ((index):10)

While the RequireJS documentation provides some direction on this error, in practice it can be a nightmare to understand what’s actually happening as the error trace provides no indication as to the underlying code causing the issue.

Fortunately, my colleague found an approach for getting to the actual source of the problem. In this post I’ll share that approach.

Finding Largest Tables in MySQL 8 / MariaDB 10.2

Published: January 8, 2021


If you’re like me the Percona blog’s “Finding the largest tables on MySQL Server” from 2008 is a resource you frequently visit.

However, when running the query recently I experienced the following error:

ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'rows,

Fastly Timeouts Caused By Request Collapsing

Published: January 7, 2021

Recently I was involved in diagnosing an odd issue. For a specific page on a website, customers were experiencing extremely slow responses, frequently timing out with the following message.

Timed out while waiting on cache-dca17735-DCA

NOTE: cache-dca17735-DCA in this case refers to Fastly's DCA data center in Ashburn, VA. (See: This aspect of the response would change from user to user, however the "Timed out while waiting on" part was consistent.

However, when we looked at the application backend we saw no sign that it was unhealthy in any way. While we did see that throughput was slightly elevated for the route in question, average server response times were quick, and there were no signs that any of the infrastructure was overloaded.

Magento Cloud Page Cache Hit Rate with New Relic Logs

Published: December 30, 2020


Way back in 2016, I spoke extensively about monitoring page cache hit rate in Magento. The content (and code) was based on the Magento 1 full page cache implementation. Now, four-and-a-half years later I wanted to give an update on the topic, discussing how we can now do this out of the box via New Relic logs for merchants running on Magento Cloud.

Magento Cloud Response Times as measured by Fastly in New Relic

Published: December 29, 2020


Recently I’ve been dealing with a Magento performance issue that appears to been caused by Fastly (more on that in another post). Here I wanted to share a quick tip on how to view Fastly response times for Magento Cloud in New Relic.

Embedding Dynamic Content Without Sucking

Published: December 18, 2020


A common pattern for embedding dynamic content on the web looks something like this:

<div id="content-will-go-here"></div>
<script src="//"></script>

In this example, the <div> is initially empty on the page, and then the JavaScript pulls content from a 3rd party and dynamically injects it into the <div>.

While this strategy makes sense in principle, there are a number of issues with the markup presented above. In this post we’ll look at how to fix up this approach so that is no longer sucks.