Memory leak in Drush when performing heavy operations

02.10.2023
Drush executes a command or script in a single process. This means that performing long and heavy operations can lead to memory leaks due to static cache accumulation. This is especially noticeable when performing CRUD operations for a large number of entities, for example, when performing batch processing (batch). Drush has a mechanism to handle such situations in the context of batch operations.