You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Every now and then our vpn connection from our aws vpc in which the nestjs application is running in breaks. This typically causes the aws ecs container (nestjs application) to restart (due to aws application loadbalancer health check cerification). When the app is back, the healthcheck still often times fails once or twice until finally the vpn connection is back up. However this leads to some strange behaivior. While the healthcheck passes, the database connection in reality doesnt work. So when the first request comes in, we get the following error:
�[31m[Nest] 28 - �[39m08/15/2022, 6:54:03 AM �[31m ERROR�[39m �[38;5;3m[ExceptionsHandler] �[39m�[31mConnection is not established with mysql database�[39m
TypeORMError: Connection is not established with mysql database
at /app/node_modules/typeorm/driver/mysql/MysqlDriver.js:710:22
also we get �[31m[Nest] 28 - �[39m08/15/2022, 7:09:41 AM �[31m ERROR�[39m �[38;5;3m[ExceptionsHandler] �[39m�[31mNo metadata for "CaseEntity" was found.�[39m
where as CaseEntity is an entity of our database. The healthcheck controller looks like this:
we can only reproduce it by using aws vpc and and cut the connection and bring it back during the the launch of the nestjs app. There is no reproduction code, since this is infrastructure related and probably a deeply nested issue with typeorm, nestjs and the mysql driver?
Expected behavior
Either the nestjs application healthcheck should fail or the nestjs application should not boot up.
Rainson12
changed the title
typeorm helth check successfull even though connection is broken
typeorm health check successful even though connection is broken
Aug 16, 2022
Is there an existing issue for this?
Current behavior
Every now and then our vpn connection from our aws vpc in which the nestjs application is running in breaks. This typically causes the aws ecs container (nestjs application) to restart (due to aws application loadbalancer health check cerification). When the app is back, the healthcheck still often times fails once or twice until finally the vpn connection is back up. However this leads to some strange behaivior. While the healthcheck passes, the database connection in reality doesnt work. So when the first request comes in, we get the following error:
also we get
�[31m[Nest] 28 - �[39m08/15/2022, 7:09:41 AM �[31m ERROR�[39m �[38;5;3m[ExceptionsHandler] �[39m�[31mNo metadata for "CaseEntity" was found.�[39m
where as CaseEntity is an entity of our database. The healthcheck controller looks like this:
Minimum reproduction code
/
Steps to reproduce
we can only reproduce it by using aws vpc and and cut the connection and bring it back during the the launch of the nestjs app. There is no reproduction code, since this is infrastructure related and probably a deeply nested issue with typeorm, nestjs and the mysql driver?
Expected behavior
Either the nestjs application healthcheck should fail or the nestjs application should not boot up.
Package
@nestjs/common
@nestjs/core
@nestjs/microservices
@nestjs/platform-express
@nestjs/platform-fastify
@nestjs/platform-socket.io
@nestjs/platform-ws
@nestjs/testing
@nestjs/websockets
Other package
@nestjs/terminus
NestJS version
8.1.0
Packages versions
Node.js version
14.15.4
In which operating systems have you tested?
Other
No response
The text was updated successfully, but these errors were encountered: