0

Could not find any answer to this question

google cloud function eats up all available postgresql connections

library used pg@8.8.0

firebase reports 20 active users and postgresql is up to 100 parallel connection

 const client = await pool.connect();
 await client.query(`INSERT INTO ${table} (id, update_time, doc) 
              VALUES
              ($1,NOW(),$2)
              ON CONFLICT (id) DO UPDATE 
              SET update_time = excluded.update_time, 
              doc = excluded.doc;`, [documentId, document]);
 client.release();

am I doing something wrong ?

how can I detect if google spins multiple instances of the same function ?

dsl400
  • 322
  • 3
  • 14
  • Where is this application running, and are you using firebase functions to connect to ppstgres db,also where do you see these number of connections is it during a function call for I/O operations. – Vaidehi Jamankar Nov 10 '22 at 12:47

0 Answers0