after updating social_auth to latest rc version, When trying to execute the updb for "social_auth_post_update_encrypt_tokens" it throws error:

> PHP Fatal error:  Allowed memory size of 536870912 bytes exhausted (tried to allocate 20480 bytes) in /core/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorage.php on line 506
>  [warning] Drush command terminated abnormally. Check for an exit() in your Drupal site

Need improvement for the batch process that we have in the hook. which executes multiple queries to fetch all the results and there seems an issue with batch process as well, as it executes in double of previously executed records.

Here's the attached screen shot:
drush command screenshot

As you can see the number of records it executes in the next batch like 10, 30, 70..... which makes it hard to execute, when we have more number of records. In my case the results are in lakhs.

Comments

miteshmap created an issue. See original summary.

miteshmap’s picture

Version: 8.x-2.0-rc2 » 8.x-2.x-dev
Status: Needs work » Needs review
StatusFileSize
new2.18 KB
new279.55 KB

Refactored the way we fetch records and update results. Here's the screenshot of improvement:
drush successful for 1 Lakh records

miteshmap’s picture

Assigned: miteshmap » Unassigned
miteshmap’s picture

miteshmap’s picture

Issue summary: View changes
StatusFileSize
new569.76 KB
miteshmap’s picture

Issue summary: View changes
miteshmap’s picture

Issue summary: View changes
miteshmap’s picture

StatusFileSize
new2.04 KB

Updated patch to fetch records from database during batch execution, instead of storing it as array in a variable.

miteshmap’s picture

StatusFileSize
new2.02 KB
miteshmap’s picture

StatusFileSize
new2.02 KB

  • wells committed d5ae900 on 3.x authored by miteshmap
    Issue #3156154 by miteshmap: social auth encrypt_tokens update -  throws...
wells’s picture

Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.