I have nodejs express app which intended to serve client requests.
I am experiencing an issue while executing concurrent requests. The database connection hangup when I concurrently process client requests:
What the app will do when it receives a request?
Open a database connection -
db = new Database(dbConfig.url); db.useDatabase(dbConfig.name); db.useBasicAuth(dbConfig.username, dbConfig.password);There are multiple middleware functions that need to access to perform various functions and accessibility checks. And for each middleware I tried to
This works fine with single request at a time. But if I tried to call two APIs at same time, I am getting CONNECTIONRESET error. And also throwing socket hangup error.
I tried to commend out the close connection method and it started working fine for a while. But when I increased the number of connections, it again showing the same error as "CONNECTIONRESET".
I have searched the documentation of arangojs regarding the connection manipulation. But I havent found any information regarding the same.
I hope to get some help from the community here.
Any help would be deeply appreciated.
Thanks Syam