I have a custom drush script. This script loads, changes and saves ~10000 drupal commerce products.
After that I get the message
Command dispatch complete [1140.43 sec, 663.25 МБ] [notice]
Timer Cum (sec) Count Avg (msec)
page 1140.368 1 1140367.61
drupal_http_request 67.66 1032 65.562
Peak memory usage was 784.48 МБ [1140.43 sec, 663.24 МБ]
And AFTER that script hangs and consumes more and more memory. Finally, after long time, script reaches 1.5 G memory limit and dies.
PHP Fatal error: Allowed memory size of 1610612736 bytes exhausted (tried to allocate 80 bytes) in /var/www/vhosts/mysite.ru/htdocs/sites/all/modules/contrib/entity/includes/entity.wrapper.inc on line 302
Fatal error: Allowed memory size of 1610612736 bytes exhausted (tried to allocate 80 bytes) in /var/www/vhosts/mysite.ru/htdocs/sites/all/modules/contrib/entity/includes/entity.wrapper.inc on line 302
All products which were processed by the script are sucessfully changed.
The question: why drush script hangs when dispatch is complete and what it makes for such a long time when all products are processed? Is it sort of a post-processing?
Denis