Categories
Docker Linux

How to check memory limit inside Docker container

You should know the memory limit of your container (not the whole host) when packing applications there. For example and simplicity, let’s imagine you are creating customized redis, memcached or varnish image and you wish to know available memory when the container starts to set it as the memory limit for your application.

Categories
Magento

Magento2 Recommended OpCache Configuration

Magento is very demanding on component settings. Everything has to be carefully configured, especially the opCache in PHP. It is opCache that is mainly responsible for PHP’s performance.

Categories
Magento

java.lang.IllegalArgumentException: Limit of total fields [1000] in index [magento2_product_1_v3] has been exceeded

It is because the default value of index.mapping.total_fields.limit is 1000. To increase it for some index to 2000 just run curl request:

curl -s -XPUT http://elasticsearch:9200/magento2_product_1_v3/_settings -H 'Content-Type: application/json' -d '{"index.mapping.total_fields.limit": 2000}'
Categories
Linux

Show disk usage ignoring mounts

If you wish to know how much space uses some dir in Linux, you can use du -hs /some-folder. But what if you have a lot of mixed mounts in that folder and you want to know how much exactly this folder consumes at root disk storage?

Categories
Linux

Get count of files in a Linux directory recursively

It is very simple:

for i in */ .*/ ; do 
    echo -n $i": " ; 
    (find "$i" -type f | wc -l) ; 
done
Categories
Magento

PHP 7.4 preloading feature for Magento

PHP 7.4 introduces the opcache preloading function. Its meaning is to load all the necessary scripts into memory at the stage of starting the PHP daemon. Let’s see if this feature is worth using in Magento?

Categories
Varnish

Reload Varnish VCL using varnishadm

You can reload Varnish config without losing your cache. To do this, you should use the standard varnishadm CLI utility.

Categories
Uncategorized

WordPress slow 404 at Apache

After installing WordPress, you should definitely do a basic performance check. You should at least watch the logs and run Htop (or just Top). When you look at the access_log, you can find many 404 errors that need to be fixed.

Categories
Uncategorized

Teams notifications not working at macOS

You may have noticed that after the update, Teams stopped showing the number of unread messages in the icon in the Dock. Also, Teams is not present in the notification center. It is absent there, so it cannot be configured in any way.

Categories
Uncategorized

Transfer of domains between OVH accounts

For those who don’t know, OVH is such a large and well-known French cloud provider. If you need to transfer a domain from one OVH client to another, then you do not need to go through the standard transfer procedure. OVH does this by changing the contact for the service.