I am currently trying to deploy abc-user-feedback in our cloud environment.
The backend throws internal server errors on various requests.
ERROR (1): Pool does Not exists.
However, when manually attaching to the container I am able to connect to my db.
In fact, the migrations are applied. The backend is able to connect to the database.
[
{ id: 1, timestamp: 1692159572819, name: 'Init1692159572819' },
{
id: 2,
timestamp: 1692690482919,
name: 'IssueNameUnique1692690482919'
}
]
I am curious if you have any ideas why the backend throws these internal server errors, eventhough it is cleary able to connect to the database.
Maybe this is because of the virtualized environment where I do not have real or full cpu cores?
2023-09-27T06:00:46.857615991Z [06:00:46.658] ERROR (1): Pool does Not exists. {"req":{"id":"req-1","method":"GET","url":"/api/tenants","query":{},"headers":{"host":"mydomain","user-agent":"Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:109.0) Gecko/20100101 Firefox/117.0","accept":"application/json, text/plain, */*","accept-language":"en-GB,en;q=0.5","accept-encoding":"gzip, deflate, br","origin":"https://mydomain","referer":"https://mydomain/","sec-fetch-dest":"empty","sec-fetch-mode":"cors","sec-fetch-site":"same-site","te":"trailers","x-forwarded-for":"myip","x-envoy-external-address":"myip","x-request-id":"92184c43-fc99-4e62-9bd4-4a3792669b18","x-envoy-expected-rq-timeout-ms":"1800000","x-k8se-app-name":"myappname","x-k8se-app-namespace":"k8se-apps","x-k8se-protocol":"http1","x-k8se-app-kind":"web","x-ms-containerapp-name":"myappname","x-ms-containerapp-revision-name":"myappname","x-arr-ssl":"true","x-forwarded-proto":"https"},"remoteAddress":"10.0.0.19","remotePort":42956},"context":"ExceptionsHandler"}
2023-09-27T06:00:46.857677266Z err: {
2023-09-27T06:00:46.857685481Z "type": "Error",
2023-09-27T06:00:46.857691122Z "message": "Pool does Not exists.",
2023-09-27T06:00:46.857695721Z "stack":
2023-09-27T06:00:46.857700730Z Error: Pool does Not exists.
2023-09-27T06:00:46.857706461Z at PoolNamespace.getConnection (/app/apps/api/node_modules/mysql2/lib/pool_cluster.js:37:17)
2023-09-27T06:00:46.857711660Z at PoolCluster.getConnection (/app/apps/api/node_modules/mysql2/lib/pool_cluster.js:177:15)
2023-09-27T06:00:46.857717762Z at /app/apps/api/src/driver/mysql/MysqlDriver.ts:933:30
2023-09-27T06:00:46.857722651Z at new Promise (<anonymous>)
2023-09-27T06:00:46.857727500Z at MysqlDriver.obtainSlaveConnection (/app/apps/api/src/driver/mysql/MysqlDriver.ts:932:16)
2023-09-27T06:00:46.857731508Z at MysqlQueryRunner.connect (/app/apps/api/src/driver/mysql/MysqlQueryRunner.ts:81:18)
2023-09-27T06:00:46.857735926Z at /app/apps/api/src/driver/mysql/MysqlQueryRunner.ts:191:55
2023-09-27T06:00:46.857740324Z at new Promise (<anonymous>)
2023-09-27T06:00:46.857744713Z at MysqlQueryRunner.query (/app/apps/api/src/driver/mysql/MysqlQueryRunner.ts:189:16)
2023-09-27T06:00:46.857749021Z at SelectQueryBuilder.loadRawResults (/app/apps/api/src/query-builder/SelectQueryBuilder.ts:3789:43)
2023-09-27T06:00:46.857752818Z }
2023-09-27T06:00:46.859592084Z [06:00:46.659] INFO (1): request errored {"req":{"id":"req-1","method":"GET","url":"/api/tenants","query":{},"headers":{"host":"mydomain","user-agent":"Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:109.0) Gecko/20100101 Firefox/117.0","accept":"application/json, text/plain, */*","accept-language":"en-GB,en;q=0.5","accept-encoding":"gzip, deflate, br","origin":"https://mydomain","referer":"https://mydomain/","sec-fetch-dest":"empty","sec-fetch-mode":"cors","sec-fetch-site":"same-site","te":"trailers","x-forwarded-for":"myip","x-envoy-external-address":"myip","x-request-id":"92184c43-fc99-4e62-9bd4-4a3792669b18","x-envoy-expected-rq-timeout-ms":"1800000","x-k8se-app-name":"myappname","x-k8se-app-namespace":"k8se-apps","x-k8se-protocol":"http1","x-k8se-app-kind":"web","x-ms-containerapp-name":"myappname","x-ms-containerapp-revision-name":"myappname","x-arr-ssl":"true","x-forwarded-proto":"https"},"remoteAddress":"10.0.0.19","remotePort":42956},"res":{"statusCode":500,"headers":{}},"responseTime":94}
2023-09-27T06:00:46.859609376Z err: {
2023-09-27T06:00:46.859616420Z "type": "Error",
2023-09-27T06:00:46.859621509Z "message": "failed with status code 500",
2023-09-27T06:00:46.859626639Z "stack":
2023-09-27T06:00:46.859632059Z Error: failed with status code 500
2023-09-27T06:00:46.859638020Z at onResFinished (/app/apps/api/node_modules/pino-http/logger.js:110:39)
2023-09-27T06:00:46.859643571Z at ServerResponse.onResponseComplete (/app/apps/api/node_modules/pino-http/logger.js:173:14)
2023-09-27T06:00:46.859649021Z at ServerResponse.emit (node:events:526:35)
2023-09-27T06:00:46.859654762Z at onFinish (node:_http_outgoing:1001:10)
2023-09-27T06:00:46.859669750Z at callback (node:internal/streams/writable:555:21)
2023-09-27T06:00:46.859675791Z at afterWrite (node:internal/streams/writable:500:5)
2023-09-27T06:00:46.859681252Z at afterWriteTick (node:internal/streams/writable:487:10)
2023-09-27T06:00:46.859686321Z at processTicksAndRejections (node:internal/process/task_queues:81:21)
2023-09-27T06:00:46.859691581Z }