Lets say your php script takes a lot of time to process but nginx closes the connection and you see a 502 screen. What happens to your php execution? Here, we want to understand php processes shutdown behavior.

In this context, exploring register_shutdown_function behavior is relevant.

We will explore 6 scenarios for php program:

Of course you gotta have PHPSTORM.

This is about using Magento 2 internal classes useful for building restapi client in your magento extension.


Oauth class will help you deal with REST authorization. Interesting function is `buildAuthorizationHeader` . Of course you should inject \Magento\Framework\Oauth\OauthInterface in your code instead of the class.


For building valid json bodies.


If you want to convert an object like order to array use.

Magento2 ui library seemed overwhelming when I first started working with it. Not knowing knockout.js was part of the reason. I went through knockout docs and tutorials. It only frustrated me because the way magento uses knockout wasn’t very straight forward. Take a look at javascript code in Magento_Ui module and you will quickly realize knockout is only half the story. By digging into the code I’ve realised you need to understand following things about ui system :

I work on an analytics platform and recently I wanted to create test database from our live database which is around 600GB. We are using mysql version 5.6. Actions table contains billions of records. I wanted to take slice of that table. I wrote a query using IN clause. For some reason IN queries look very simple to comprehend compared to a similar query written using JOINs. For the first time I’ve understood, IN clause may come with a cost.

CREATE TABLE test SELECT * FROM actions_live_table where id IN (SELECT id from <reference_table created from union>);

The reference table…

Often while coding I experience mental blocks. I feel stuck. This feeling makes me aware of a potential skill to be developed. Probably the most important skill. I ask myself, how do you break such mental blocks (feeling of being stuck)??

First step is to recognise that you are feeling blocked. This is not always obvious. This feeling can manifest in form of lethargy, procrastination, moodiness or other excuses. This “being stuck” happens to me when I have no clue on how to solve a problem. The problem seems to be impossible to solve. I don’t know where to begin…

So we got a huge project to work on, Magento 2 migration. The existing store was highly customised. Team consisted of 6 people, 3 developers, 1 QA, a theme designer and a “Database guy”. Our job was to move customer to M2 with all their existing functionality and data. Since the store was really old, there was no clear requirement document.

And we began with git as our primary tool. We setup three servers, dev environment, staging environment and customer environment. We agreed on this cycle of any feature :

If you are here, I’m gonna assume you have already heard a lot about machine learning. We will start of our journey by starting with really simple and intuitive algorithm. It always begins with classification problems. Apples or Oranges? What is that digit? Is it a one or perhaps seven? Hence we shall start with classification algorithms.

The first algorithm in classification problems is k-nearest-neighbor algorithm. Imagine you are an alien and you land in silicon vally. You see faces from all races. You notice that some people are labeled as Chinese, some are Indians and some are Americans. A…

I started playing around with service workers with magento2 platform. I could have started with Google code lab on Progressive web Apps but I was too excited to implement service workers in magento2. It kind of makes sense to take advantage of service workers for ecommerce websites. For me the most exciting feature of service workers is it’s ability to act like a proxy. You can modify request and responses. You can choose whether you want to serve the content from cache or network or mix em up. Pretty cool right!! The whole point is to increase perceived speed. But…

Most difficult bugs are those bugs that do not cause any errors. One such bug is checkout going blank without any errors. It was very strange. I took an exact copy of the site on my local but checkout would work just fine. It was only on the live site that checkout would go blank without errors. Not even testing replica would have that problem which was on the same server!! It’s an engaging problem. Where do you start debugging?

I always start by looking at page source and logs. Generally, page source might have a notice level error. But…

Abhishek Jakhotiya

just a bug hunter and problem addict

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store