# Error: spawn E2BIG

**URL:** <https://community.n8n.io/t/error-spawn-e2big/10925>\
**Category:** Questions\
**Tags:** node\
**Created:** [January 26, 2022, 10:28am UTC](https://community.n8n.io/t/error-spawn-e2big/10925 "2022-01-26T10:28:56Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![jordir](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/jordir/32/10220_2.png) [@jordir](https://community.n8n.io/u/jordir)\
**Post date:** [January 26, 2022, 10:28am UTC](https://community.n8n.io/t/error-spawn-e2big/10925/1 "2022-01-26T10:28:56Z")

</div>

Hi,  
I’m using the response of http request of a web page that returns a thread dump of java process (that could be a lot of output text)  
After this node I put a “Execute command” doing echo “” | head -n -1 and this gives me this error:

```auto
Error: spawn E2BIG
    at ChildProcess.spawn (internal/child_process.js:403:11)
    at spawn (child_process.js:553:9)
    at Object.execFile (child_process.js:237:17)
    at Object.exec (child_process.js:158:25)
    at /usr/local/lib/node_modules/n8n/node_modules/n8n-nodes-base/dist/nodes/ExecuteCommand/ExecuteCommand.node.js:14:25
    at new Promise (<anonymous>)
    at execPromise (/usr/local/lib/node_modules/n8n/node_modules/n8n-nodes-base/dist/nodes/ExecuteCommand/ExecuteCommand.node.js:13:12)
    at Object.execute (/usr/local/lib/node_modules/n8n/node_modules/n8n-nodes-base/dist/nodes/ExecuteCommand/ExecuteCommand.node.js:72:68)
    at Workflow.runNode (/usr/local/lib/node_modules/n8n/node_modules/n8n-workflow/dist/src/Workflow.js:524:37)
    at /usr/local/lib/node_modules/n8n/node_modules/n8n-core/dist/src/WorkflowExecute.js:447:62

```

Could you help me, please?

---

<div class="post-metadata">

**Author:** ![Jon](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/jon/32/40174_2.png) [@Jon](https://community.n8n.io/u/Jon)\
**Post date:** [January 26, 2022, 10:44am UTC](https://community.n8n.io/t/error-spawn-e2big/10925/2 "2022-01-26T10:44:45Z")

</div>

Hey @jordir,

It has been a long time since I have seen an e2big error message, Are you passing the entire output of the web request to the echo? You normally see e2big when the command length is too big so it could be that you hit the `ARG_MAX` limit if you run `getconf ARG_MAX` in your execute command it will tell you how many bytes you can have in a command per argument.

Best bet would be to take the response, save it to the local file and then use cat with the head command or depending on what is splitting the lines in the output you might be able to just use a function node / expression.

---

<div class="post-metadata">

**Author:** ![jordir](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/jordir/32/10220_2.png) [@jordir](https://community.n8n.io/u/jordir)\
**Post date:** [January 26, 2022, 2:10pm UTC](https://community.n8n.io/t/error-spawn-e2big/10925/3 "2022-01-26T14:10:50Z")

</div>

Thanks @Jon.  
Is this I’m passing the entire output. I tried your solution and it works ;).

---

<div class="post-metadata">

**Author:** ![Jon](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/jon/32/40174_2.png) [@Jon](https://community.n8n.io/u/Jon)\
**Post date:** [January 26, 2022, 2:12pm UTC](https://community.n8n.io/t/error-spawn-e2big/10925/4 "2022-01-26T14:12:44Z")

</div>

Perfect 👍

So what is your long term goal with the thread dump? Will you be using n8n to automate part of an analysis process?

---

<div class="post-metadata">

**Author:** ![jordir](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/jordir/32/10220_2.png) [@jordir](https://community.n8n.io/u/jordir)\
**Post date:** [January 26, 2022, 2:26pm UTC](https://community.n8n.io/t/error-spawn-e2big/10925/5 "2022-01-26T14:26:06Z")

</div>

Hi Jon,  
The idea is use n8n for analysis.  
We have an endpoint of get all the thread dump and in the first line we have a summary.  
My idea is get this line and if this line pass some limit then send an email (at least for the first version).
