So, if you encounter a Magento 2 internal server error, it won’t appear as a white page with black textHave you ever seen a page with “There has been an error processing your request” when using Magento 1 or Magento 2? If no, you are lucky. This page is usually displayed when an issue appears in a system execution flow. Magento processes such issues by creating a separate report file in the var/report directory and by showing the error page with the details. You can also see a similar page “Service Temporarily Unavailable” when the maintenance mode has been enabled. Did you know that you can easily customize these error pages?
Before running your store in production mode it’s very important to check as many Magento 2 performance aspects as possible, since even a minor performance issue might cost time and money in the future. Formally, a web application’s performance can be classified using two parts: frontend performance and backend performance.
During our work with the Magento 2 Rich Snippets module, we noticed numerous errors on the product list page when switched to list mode. The errors were generated by the standard Magento 2 Luma theme, when attempting to aggregate rating markup rendering for each product in the product list. This article outlines a configurable solution to address this issue. We will have an opportunity to disable this fix for any custom theme which doesn’t have this error or in case the next Magento 2 version has a fix for this included.
When discussing bottlenecks in Magento backend implementations, we often refer to the built-in profiler, which allows us to view the loading times of specific backend functional elements. There are two general factors of such bottlenecks: heavy (or repetitive) database calls or slow PHP operations such as loops and similar cases.
Scheduled background processes are important in any large system. Clean ups and keeping cache and indexes up to date allow to keep your system healthy, while some processes are simply need to be stretched in time in order to avoid high system load, memory leaks or certain services overload (massive emails sending). Setting up a cron job for such processes and for the processes that should be repeated from time to time is always a good idea. In this blog post we will describe how to set a certain part of code as a cron job in Magento 2.
One of Magento 2 goals is to enable performance for all and scalability for Enterprise customers. Page Cache plays an important role in Magento 2. Starting from Magento 2.0.0 release Page Cache functionality (it is also known as Magento Full Page Cache) is available for Magento 2 Community Edition.
As we all know, the page’s HTML <head> section contains different meta tags, CSS and JS files definition, pieces of JS code etc. As a rule, we don’t need any complex logic to add some proper content there. However, let’s imagine the situation when we need to insert some element that depends on the system configuration or so into the head section.