Out of Memory Error

Hi all, I built a workflow and am getting the ‘Out of Memory’ error. I’m not expert, but it doesn’t feel like I’m dealing with enough data for this to be a legit problem. Also, the error does NOT occur in testing, and still occurs even if I bump my workflow memory to the max.

Here’s the workflow:

[Trigger] Webhook.

  • Results in 15 line items under Context, and 15 line items under Event. No attachments.

[Action] Python Code

  • Runs 21 lines of code that check for spam keywords, if they don’t exist then I format a phone number from the trigger step, then export that phone number.

[Action] end_workflow_condition

  • Checks the results of the spam filter in previous step, continues if spam not detected

[Action] Pipedrive step to search for a person

  • This is basically a GET request that uses the phone number

[Action] end_workflow_condition

  • Checks to see if the person already exists

[Action] Pipedrive step to add a deal

  • This is basically a POST request that uses the phone number

[Action] Pipedrive step to add an activity

  • This is basically a POST request that uses the phone number

[Action] Pipedrive step to add an activity

  • This is basically a POST request that uses the phone number

[Action] Webhook POST

  • Sends off the original forms info into a new webhook. A simple POST request with 12 parameters

Again, none of this seems like it should exceed the minimum memory settings, but especially not the max. Advise?

Hi @dhill1

The Python code steps are still in Alpha and they may be the cause of the Out of Memory error, in general we advise upping the memory limits of any workflows running Python code steps.

You can try this by opening the workflow’s settings, then increasing the memory of the workflow:

Could you also share the URL of the workflow and also share it with support under the workflow settings? It would help us see the specific logs so we can triage the issue.

Thanks!

Hi Pierce, here is the workflow: https://pipedream.com/@irishiron/new-phone-call-received-p_q6C2zdR/

I toggled the setting.

The flow fails to work even at the highest memory allocation, so unfortunately changing that setting is not a solution.

Hi @dhill1

Thanks for sharing, I was able to pull up the details.

It looks like the past 3 executions were able to run without the memory exhausted error.

The missing runtime errors stack trace for Python steps (exited with code 1) is a known bug in the UI and we’re working on fixing it.

But in the meantime I was able to pull up the logs manually from the backend:

File \"/opt/ee/c_qafp3Gro/script.py\", line 5, in <module>\n    phone = steps[\"trigger\"][\"event\"][\"number\"]\nKeyError: 'number'\n"

It looks like for the latest execution, the event is missing the number, unfortunately in share mode I don’t have access to your trigger or see the exact step exports data at the time of the error, but it might be that the data is missing from that particular event or it’s mapped at a different location.

But it sounds like your workflow is an HTTP webhook, then if the number is in the body of the request, I believe you need to reference that too:

phone = steps["trigger"]["event"]["body"]["phone"]

Hope this helps!

I confirmed that all the data is being transferred and tried changing the definition of the variable like you described but neither fo them fixed the problem.