Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

342
Visualizações
Node error ENOSPC when running pm2 with docker-compose

When my pm2 service is launched I get the following error:

Error: watch /usr/src/app/node_modules/zip-stream/node-modules/loadash/... ENOSCP
    at exports._errnoException (util.js:1034:11)
    at FSWatcher.start (fs.js:1400:19)
    at Object.fs.watch (fs.js:1426:11)
    at createFsWatchInstance (/usr/local/lic/node_modules/pm2/node_modules/chokidar/lib/nodefs-handler.js:37:15)
    ....
    at FSReqWrap.oncomplete (fs.js:114:15)

This occurs only when build and run the docker with:

docker-compose --build up

If I only build the docker, and then command inside the docker:

docker-compose exec downtorrent_back_dev bash

sh start.sh

then, it starts the service without any problems.

This is the docker-compose.yml file:

version: '3'
services:
  downtorrent_back:
    container_name: downtorrent_back_dev
    build:
      context: .
      dockerfile: Dockerfile-back.dev
    volumes:
      - ./back:/usr/src/app
    expose:
      - "10002"
      - "9090"
      - "51413"
    ports:
      - "10002:10002"
      - "9090:9090"

This the script start.sh that starts the service:

#!/bin/bash

# Fix limit on system for watching files
echo fs.inotify.max_user_watches=524288 | tee -a /etc/sysctl.conf && sysctl -p
npm dedupe

# Start transmission torrent client
service transmission-daemon start
# Start service
pm2 start start.config.json --only downtorrent --env dev --no-daemon

And this is the PM2 config file:

{
  "apps": [{
    "name": "downtorrent",
    "script": "./app.js",
    "watch": true,
    "ignoreWatch": ["newrelic_agent.log"],
    "instances": 2,
        "log_date_format" : "DD-MM-YYYY HH:mm Z",
    "exec_mode": "cluster",
    "env": {
      "NODE_ENV": "dev",
      "APP_PORT": 10002
    }
  }]
}

As you can see, I've already tried the proposed solution in this question for the ENOSCP problem, but still not working.

about 4 years ago · Santiago Trujillo
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda