[Vtigercrm-developers] batch update task eats up memory

Alan Lord alanslists at gmail.com
Fri Oct 23 07:04:46 GMT 2020


On 23/10/2020 07:45, Alan Lord wrote:
> 2. If it's still a problem, write a wrapper in bash which runs the php 
> file based on a counter and passes in the value, so you could do then in 
> blocks of say 1000 rows or whatever and have a LIMIT on your query. This 
> would then close the php file and re-open it again. Stops memory issues 
> like this.

e.g.

#!/bin/bash
for ((C=0; C <= 32000; C=C+1000))
do
         php -f update_vtiger_database.php $C
done

Then the value of "C" will be available to your php script in $argv[1].

Al



More information about the vtigercrm-developers mailing list