PHP Fatal error: entity type does not exist

If you somehow get into this nasty problem, you have probably made some big mistake and now you are missing entity definition in your database. To quickly fix that you need to recreate it, you can use drush for it.  So if you are lucky find in code where this entity was added, probably in some hook_update in module.install file 

Database tables created that are not from entity definitions

If you browse around the DB tables in your drupal site, you might stumble into tables with double underscore names like commerce_order__shipments, this is most probably a table created as part of drupal field API system, mostly created as a multivalue field for some entity. It could be created when user creates field in UI or it could be programmatically made, like here

503 Max restarts limit reached

So we had "503 Max restarts limit reached" problem on our production while doing some batch operations and some edits of entities. Problem for both was that server response was slow as both have large queries running which take more than 20 seconds(yeah should be optimized and probably add some indexes to fields).

Getting country name from country code

To get full country name you need to use CountryManager class and you can then get all the info you need.  So lets say you have some country code store in $shipping_code variable, to get full country name

Checking all crontabs on server

To get all crontabs from users on your system write this one liner

for user in $(getent passwd | cut -f1 -d: ); do echo $user; crontab -u $user -l; done

to check other crons you need to see what is in for example 

ls -la /etc/cron.daily

or

JSON:API disable caching locally

To disable caching while testing your JSON:API endpoints you should put this into your settings.php

$settings['cache']['bins']['dynamic_page_cache'] = 'cache.backend.null';

but for this to work, you need to define this service null, which should be added as