# Custom code only run up to 128 MB memory

**URL:** <https://community.hubspot.com/t/custom-code-only-run-up-to-128-mb-memory/45705>\
**Category:** Data Hub\
**Tags:** workflows\
**Created:** [October 21, 2021, 10:27am UTC](https://community.hubspot.com/t/custom-code-only-run-up-to-128-mb-memory/45705 "2021-10-21T10:27:09Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![HLai](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/hlai/32/1529_2.png) [@HLai](https://community.hubspot.com/u/HLai)\
**Post date:** [October 21, 2021, 10:27am UTC](https://community.hubspot.com/t/custom-code-only-run-up-to-128-mb-memory/45705/1 "2021-10-21T10:27:09Z")

</div>

HI all,

I have around 500k contacts in HubSpot database and would like to build custom code in workflow and run Deduplicate contact function which is mentioned at [https://www.hubspot.com/programmable-automation-use-cases?\_ga=2.88755931.1729102608.1634781895-1191604884.1614679975.](https://www.hubspot.com/programmable-automation-use-cases?_ga=2.88755931.1729102608.1634781895-1191604884.1614679975)

Will it run under 128 MB memory? Because it will collect all contacts in the database and I don’t know whether it works well.

Thank you very much for your support

Sonny.

---

<div class="post-metadata">

**Author:** ![dennisedson](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/dennisedson/32/28044_2.png) [@dennisedson](https://community.hubspot.com/u/dennisedson)\
**Post date:** [October 22, 2021, 2:34pm UTC](https://community.hubspot.com/t/custom-code-only-run-up-to-128-mb-memory/45705/2 "2021-10-22T14:34:27Z")

</div>

@HLai

Where did you get 128mb memory from 🤔

---

<div class="post-metadata">

**Author:** ![jbogaert](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/jbogaert/32/33027_2.png) [@jbogaert](https://community.hubspot.com/u/jbogaert)\
**Post date:** [October 25, 2021, 8:10am UTC](https://community.hubspot.com/t/custom-code-only-run-up-to-128-mb-memory/45705/3 "2021-10-25T08:10:35Z")

</div>

Hi @HLai

Regarding the 128MB memory limit. That will indeed impact your workflow, however, any enrolled contact that fails to go through the workflow because of it, will be retried later on. So they will still happen, but just take a little longer.  
@dennisedson, FYI it’s mentioned in the yellow box on the KB article: [https://knowledge.hubspot.com/workflows/use-custom-code-actions-in-workflows](https://knowledge.hubspot.com/workflows/use-custom-code-actions-in-workflows)
