Skip to main content
Question

Units used for memory_used_mb in the runtime_meta information given when testing code by Zapier

  • October 5, 2023
  • 4 replies
  • 59 views

I am testing out code by Zapier for the first time just to learn how to use it.  The javascript code I used in the “code by Zapier” step was a single line just 65 characters long:

output = [{firstThreeLetters: inputData.subject.substring(0,3)}];

When I tested the code the runtime_meta showed that the value for memory_used_mb was 62.  My question is this:
What is the unit of measure for the 62?  Is it Megabyes as the name implies or is it actually Kilobytes?  Reason tells me that for the small amount of code I wrote, the unit of measure is most likely Kilobytes.  Can anybody confirm that it actually is Kilobytes?  Is there any documentation saying what the unit of measure is?

 

Thanks ahead of time.

This post has been closed for comments. Please create a new post if you need help or have a question about this topic.

4 replies

Troy Tessalone
Zapier Orchestrator & Solution Partner
Forum|alt.badge.img+14
  • Zapier Orchestrator & Solution Partner
  • October 5, 2023

Hi @cagbelt 

Good question.

The environment in which your Code steps run (AWS Lambda) has an I/O limit of 6MB.

 

This is what ChatGPT returned.

 


  • Author
  • Beginner
  • October 5, 2023

Thanks for your reply.  As I reread my question I realize that the kilobyte unit is probably too big to be reasonable.  I think the unit of measure for the memory_used_mb value is actually bytes, not kilobytes.


Troy Tessalone
Zapier Orchestrator & Solution Partner
Forum|alt.badge.img+14
  • Zapier Orchestrator & Solution Partner
  • October 5, 2023

@cagbelt 

For context, I’ve written Code steps with 100s of lines of code and it executes without issue.


  • Author
  • Beginner
  • October 5, 2023

Thank you very much, Troy.  That helps.