Posts

Performance Scaling

Apache MPMs Explained

The Apache web server is the most popular web server in the world. This is in part due to its modular design. Apache 2 introduced Multi-Processing Modules, or MPMs. The MPMs change the basic functionality of the web server. They do this by modifying how Apache listens to the network, accepts, and handles requests. A lot of this functionality is rather technical and outside of the purview of this article. This article will briefly explain what the various MPMs are and how they work. For more detailed information on the various MPMs, please visit the Apache Documentation. Introduction All versions of Apache 2.0 and greater run some form of MPM, and there are a variety of MPMs for the various operating systems. This article will only be focusing on those available for the Linux operating system. First you’ll want to determine what version of Apache and which MPM your server currently is running. You can determine this by running the following command on the command line. httpd -V | grep …

session.gc_maxlifetime vs. session.cookie_lifetime [PHP]

PHP and sessions: Very simple to use, but not as simple to understand as we might want to think.

session.gc_maxlifetime

This value (default 1440 seconds) defines how long an unused PHP session will be kept alive. For example: A user logs in, browses through your application or web site, for hours, for days. No problem. As long as the time between his clicks never exceed 1440 seconds. It's a timeout value.

PHP's session garbage collector runs with a probability defined by session.gc_probability divided by session.gc_divisor. By default this is 1/100, which means that above timeout value is checked with a probability of 1 in 100.

session.cookie_lifetime

This value (default 0, which means until the browser's next restart) defines how long (in seconds) a session cookie will live. Sounds similar to session.gc_maxlifetime, but it's a completely different approach. This value indirectly defines the "absolute" maximum lifetime of a session, whether the user is active o…

Importance note for magento 2

These are common notes for magento 2 during working with this ecommerce platform.

1. Static of admin load base on locale of user login

[pub/static/adminhtml/backend/locale_of_user_login]


2. Sql for query products

-- Product entity type ID SET @etype = (SELECT entity_type_id FROM eav_entity_type WHERE entity_type_code = 'catalog_product'); -- Product name attribute ID SET @name = (SELECT attribute_id FROM eav_attribute WHERE attribute_code = 'name' AND entity_type_id = @etype); -- Product image attribute ID SET @status = (SELECT attribute_id FROM eav_attribute WHERE attribute_code = 'status' AND entity_type_id = @etype); -- Product price attribute ID SET @price = (SELECT attribute_id FROM eav_attribute …