[Automation] [NCRC] DBError: sorry, too many clients already
Running the NCRC tests on pipeline results in the following error:
DBError: sorry, too many clients already
at wrapError (/home/simplej/node_modules/db-errors/lib/dbErrors.js:19:14)
at handleExecuteError (/home/simplej/node_modules/objection/lib/queryBuilder/QueryBuilder.js:1489:32)
at QueryBuilder.execute (/home/simplej/node_modules/objection/lib/queryBuilder/QueryBuilder.js:670:20)
at runMicrotasks (<anonymous>)
at processTicksAndRejections (internal/process/task_queues.js:93:5)
at async seed (/home/simplej/scripts/clearAndSeed.js:51:21) {
nativeError: error: sorry, too many clients already
at Function.value (/home/simplej/node_modules/knex/lib/util/make-knex.js:90:29)
at buildKnexQuery (/home/simplej/node_modules/objection/lib/queryBuilder/QueryBuilder.js:1587:63)
at doExecute (/home/simplej/node_modules/objection/lib/queryBuilder/QueryBuilder.js:1465:31)
at QueryBuilder.execute (/home/simplej/node_modules/objection/lib/queryBuilder/QueryBuilder.js:667:28)
at runMicrotasks (<anonymous>)
at processTicksAndRejections (internal/process/task_queues.js:93:5)
at async seed (/home/simplej/scripts/clearAndSeed.js:51:21) {
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: '362',
routine: 'InitProcess',
originalStack: 'error: sorry, too many clients already\n' +
' at Parser.parseErrorMessage (/home/simplej/node_modules/pg-protocol/dist/parser.js:278:15)\n' +
' at Parser.handlePacket (/home/simplej/node_modules/pg-protocol/dist/parser.js:126:29)\n' +
' at Parser.parse (/home/simplej/node_modules/pg-protocol/dist/parser.js:39:38)\n' +
' at Socket.<anonymous> (/home/simplej/node_modules/pg-protocol/dist/index.js:10:42)\n' +
' at Socket.emit (events.js:315:20)\n' +
' at addChunk (internal/streams/readable.js:309:12)\n' +
' at readableAddChunk (internal/streams/readable.js:284:9)\n' +
' at Socket.Readable.push (internal/streams/readable.js:223:10)\n' +
' at TCP.onStreamRead (internal/stream_base_commons.js:188:23)'
},
client: 'postgres'
}