Git Product home page Git Product logo

parallelizing-nodejs-ops's Introduction

Parallelizing Node.js operations with child process

Example of how to Migrate 1M items from MongoDB to Postgres in just a few minutes using Node.js child process

First leave your star in the repo ๐ŸŒŸ Aumentando em 999x a velocidade de processamento de dados com Node

Running

You'll need to install Docker and Docker compose to be able to spin up the DBs instances, after that run:

  • docker-compose up -d
  • npm ci
  • npm run seed
  • npm start

Errors?

In case you got an error of too many processes open, try decreasing the const CLUSTER_SIZE variable

parallelizing-nodejs-ops's People

Contributors

erickwendel avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

parallelizing-nodejs-ops's Issues

error: sorry, too many clients already

progress [โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘] 0% | 0/1000000 | 14sC:\Trabalho\NODE PROJECT\parallelizing-nodejs-ops\node_modules\pg-protocol\dist\parser.js:283
const message = name === 'notice' ? new messages_1.NoticeMessage(length, messageValue) : new messages_1.DatabaseError(messageValue, length, name);
^

error: sorry, too many clients already
at Parser.parseErrorMessage (C:\Trabalho\NODE PROJECT\parallelizing-nodejs-ops\node_modules\pg-protocol\dist\parser.js:283:98)
at Parser.handlePacket (C:\Trabalho\NODE PROJECT\parallelizing-nodejs-ops\node_modules\pg-protocol\dist\parser.js:122:29)
at Parser.parse (C:\Trabalho\NODE PROJECT\parallelizing-nodejs-ops\node_modules\pg-protocol\dist\parser.js:35:38)
at Socket. (C:\Trabalho\NODE PROJECT\parallelizing-nodejs-ops\node_modules\pg-protocol\dist\index.js:11:42)
at Socket.emit (node:events:517:28)
at addChunk (node:internal/streams/readable:368:12)
at readableAddChunk (node:internal/streams/readable:341:9)
at Readable.push (node:internal/streams/readable:278:10)
at TCP.onStreamRead (node:internal/stream_base_commons:190:23) {
length: 85,
severity: 'FATAL',
code: '53300',
detail: undefined,
hint: undefined,
position: undefined,
internalPosition: undefined,
internalQuery: undefined,
where: undefined,
schema: undefined,
table: undefined,
column: undefined,
dataType: undefined,
constraint: undefined,
file: 'proc.c',
line: '351',
routine: 'InitProcess'
}

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.