How to handle : "only one query can be executed on a connection at a time" for tedious package?

98 views Asked by At

I created a web app that uses a tedious package to communicate with SQL Server, NodeJS and ExpressJS. But in production, when the front end (in ReactJS) makes parallel requests for example, when the user navigates to page A, they make request, and then they decide to change the screen, so they goe on page B, I have the error:

Requests can only be made in the LoggedIn state, not the SentClientRequest state

I make some research and I found that: only one query can be executed on a connection at a time. Thus, how to solve this? Does it exist a solution without changing the API for communicate with database?

I tried to stop a request before creating a request but it doesn't work.

0

There are 0 answers