Blog

Simulating an Elasticsearch Timeout

Published: May 31, 2018

Recently I submitted a contribution to the Magento 2 project to terminate requests to Elasticsearch if they exceed the configured “timeout” setting. This was done in response to a production issue experienced on a client’s site where Elasticsearch slowdowns (due to a misconfigured maximum heap size) would take an entire website down.

Basically, what was happening is that the PHP processes that were waiting for Elasticsearch responses would continue to build up until the server resources were exhausted. This would block workflows on the site that didn’t require Elasticsearch such as placing orders, wishlist / shopping cart management or administrative workflows.

In order to test this feature out, I wanted to simulate an Elasticsearch timeout. Turns out this is a lot harder than one would think. Here I’ll document my findings…

Magento 2 Slow Admin Login

Published: May 21, 2018

Tags:

Recently at Something Digital we upgraded a client’s site to version 2.1.12. Shortly thereafter, we received a report that logging in to the admin panel was taking significantly longer than usual.

Looking in New Relic we could see that the vast majority of the time was being spent reading the session from Redis.

A screenshot showing a transaction trace of a slow login in New Relic

Working with MySQL Binary Logs

Published: May 19, 2018

Tags:

Binary Logs are a useful feature in MySQL. Mainly intended for master / slave replication setups and point-in-time recovery they contain records of all changes to the MySQL database, including schema alterations and table creations, but also INSERT, UPDATE and DELETE statements. This makes them extremely useful in offering system audit-ability to do things like forensic analysis in the case of a security breach or answer questions like “why does this product keep getting disabled on my website?”.

This post answers some common questions you might have while working with them…

Lessons Learned During a Recent Magento 2 Deploy

Published: May 17, 2018

Tags:

I had an interesting Magento 2 deployment experience recently. I learned quite a few things in the process, and wanted to share them here.

Inspecting Outbound Traffic to New Relic with tcpdump

Published: May 8, 2018

tcpdump is a tool I reach for occasionally, but not on a daily basis by any means. As such, I always forget how to use it when I need it.

Most recently I was troubleshooting an issue where I couldn’t see any data in New Relic for a website I help support at Something Digital. The newrelic-daemon showed as running in the process list and no errors were reported in the logs, so one question I had was, is the server actually sending the data outbound to New Relic?

tcpdump is just the right tool to answer that question, so I decided to pull it out. Here I’ll document how I answered the question as a reference for the next time I (or you :smile:) need to pull out tcpdump.

Password Protect Files and Folders from the Command Line with zip

Published: May 4, 2018

Tags:

There are quite a few blog posts and StackOverflow threads covering this, but somehow, I had difficulty finding the answer I was looking for on Google. As such, I’m publishing this for my (and now your :smile:) reference…