-
Notifications
You must be signed in to change notification settings - Fork 286
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
Error with type 109 #430
Comments
Interesting 😊 Could you supply some more details please? |
I don't have more details. I do about 10 selects and updates per second. |
Connection details, Postgres.js version, PostgreSQL version, when does it happen, etc etc. |
connection details postgres(URI)
|
Ok good info - so everything works except sometimes you receive this error at random. Do you connect directly to a Postgres DB or is there something in between, eg pgbouncer? What connection options do you run with? |
Directly, I did not install anything other than postgresql itself. |
Do you have anything in you DB logs when this happens? |
Would love to check this out if you can create a reproducible sample. Let me know if that's possible and reopen if you're still experiencing this issue. |
@NMIFUN @porsager I have the same issue. |
deno 1.29.2, postgresql 11.7 run it few times, and you will get those errors import { parallel, range } from 'npm:radash';
import postgres from 'https://deno.land/x/postgresjs/mod.js'
const sql = postgres('YOUR_URL');
await parallel(10, [...range(0, 100)], async () => {
await sql`select 1;`; // select * from table is even better at reproducing it
}) |
It works fine when connecting through pgbouncer. |
Hello @Lesiuk did you find a fix without pgouncer? We are having this same error in prod |
This are the logs for my error. 5 connections in parallel in the same second. @porsager could you reproduce with @Lesiuk provided code?
|
Perhaps the error message is a red herring, and it is because of reaching a connection limit, and Postgres.js is missing integration for that specific case. I'll see if I can replicate something like that on my end. |
Hmm.. no, that correctly errors with |
Sorry - I haven't had time to look at issues, but going through them now and testing this, I am unable replicate, also with the code above and same postgres + deno versions. If anyone is up for making a completely reproducible setup I'd love to look into it, but until then I'm gonna close this out. |
Hi @porsager , i got the same error while trying to benchmark bun using techempower benchmark setup. Techempower benchmark setup is using this flags to create Postgres docker image:
Steps to reproduce:
docker run --name test-postgres-image -e POSTGRES_PASSWORD=mysecretpassword -e POSTGRES_INITDB_ARGS="--auth-host=md5" -e POSTGRES_HOST_AUTH_METHOD=md5 -p 5432:5432 -d postgres:15-bullseye
import postgres from 'postgres'
const sql = postgres({
host: 'localhost',
user: 'postgres',
password: 'mysecretpassword',
database: 'postgres',
})
const results = await Promise.all([...Array(150).keys()].map(async (id) => {
return sql.begin(async sql => sql`select ${id};`)
}))
console.log(results)
import postgres from 'postgres'
const sql = postgres({
host: 'localhost',
user: 'postgres',
password: 'mysecretpassword',
database: 'postgres',
})
const results = await Promise.all([...Array(150).keys()].map(async (id) => {
return sql`select ${id};`;
}))
console.log(results) Hopefully it can be fixed soon, thank you |
Yay ! I think I got it ! Just had to look at the damn code ;) Fix coming up |
PostgresError: expected password response, got message type 109
Postgres can work and give it out at some stage
What could it be?
The text was updated successfully, but these errors were encountered: