Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[PM2][ERROR] Process failed to launch spawn E2BIG #3271

Closed
liujb opened this issue Nov 10, 2017 · 2 comments

Comments

@liujb
Copy link

@liujb liujb commented Nov 10, 2017

Your issue may already be reported!
Please search on the issue tracker before creating one.

What's going wrong?

When I use supervisord to hosted my pm2 process using --no-daemon on production env at docker.

Nodejs version 6.10.3
PM2 version 2.7.2

How could we reproduce this issue?

Supporting information

Please run the following command (available on PM2 >= 2.6)

$ pm2 report
@vmarchaud

This comment has been minimized.

Copy link
Contributor

@vmarchaud vmarchaud commented Nov 16, 2017

Not related on PM2 but on your process configuration :

E2BIG: Argument list too long; used when the arguments passed to a new program being executed with one of the exec functions
@vmarchaud vmarchaud closed this Nov 16, 2017
@linweiwei123

This comment has been minimized.

Copy link

@linweiwei123 linweiwei123 commented Jul 17, 2019

I have the same problem. @vmarchaud is right! It's the env problem. I use docker to deploy my applications. The env data start with 'TEST_xxx' grow as my applications get more and more . It take 99% percent of the env length. I solve this problem by change a little code of pm2 as followed:

Change pm2 lib/Common.js line 199 as the picture shows:

image

It's not good. But it works for me. The problem is your env data is too big, you can check by these commands:

node
> process.env
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.