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

Do I get any problems when using multiple pg libaries/connection ? #3127

Open
pullmann4rent opened this issue Jan 17, 2024 · 0 comments
Open

Comments

@pullmann4rent
Copy link

Hello,

When I use the pg libary and I use 10 database connection with pool, do I get any problems or what is the disadvantage ?

exp:

  const db1 = new Pool({
    host: 'xxx',
    user: 'postgres',
    database: 'xxx',
    password: 'xxx',
    ssl: { rejectUnauthorized: false },
    port: 54232,
    max: 20,
    idleTimeoutMillis: 30000,
    connectionTimeoutMillis: 10000,
  });

  const db2 = new Pool({
    host: 'xxx',
    user: 'postgres',
    database: 'xxx',
    password: 'xxx',
    ssl: { rejectUnauthorized: false },
    port: 54232,
    max: 20,
    idleTimeoutMillis: 30000,
    connectionTimeoutMillis: 10000,
  });

  const db3 = new Pool({
    host: 'xxx',
    user: 'postgres',
    database: 'xxx',
    password: 'xxx',
    ssl: { rejectUnauthorized: false },
    port: 54232,
    max: 20,
    idleTimeoutMillis: 30000,
    connectionTimeoutMillis: 10000,
  });
  const db4 = new Pool({
    host: 'xxx',
    user: 'postgres',
    database: 'xxx',
    password: 'xxx',
    ssl: { rejectUnauthorized: false },
    port: 54232,
    max: 20,
    idleTimeoutMillis: 30000,
    connectionTimeoutMillis: 10000,
  });
...

BTW: All databases are different and not the same so all are seperated

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant