Pm2: [PM2][ERROR] Process failed to launch spawn E2BIG

Created on 10 Nov 2017  路  3Comments  路  Source: Unitech/pm2

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

Most helpful comment

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:

> process.env

All 3 comments

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

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:

> process.env

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:

> process.env

I made special configs to configure these settings. Here is PR in lib support me)
https://github.com/Unitech/pm2/pull/4596

Was this page helpful?
0 / 5 - 0 ratings

Related issues

jubairsaidi picture jubairsaidi  路  3Comments

rangercyh picture rangercyh  路  4Comments

shaunwarman picture shaunwarman  路  3Comments

morfies picture morfies  路  3Comments

lefam picture lefam  路  3Comments