Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor api mariasql usage: open new connection for each graphql request #920

Closed
Schnitzel opened this issue Feb 28, 2019 · 0 comments · Fixed by #1012
Closed

refactor api mariasql usage: open new connection for each graphql request #920

Schnitzel opened this issue Feb 28, 2019 · 0 comments · Fixed by #1012

Comments

@Schnitzel
Copy link
Contributor

we're sharing the mariasql connection object within the api container, this is great for memory usage, but unfortunately mariasql itself has a queue. So even if we have multiple graphql requests going on, the requests to the database are done sequently.
see mscdex/node-mariasql#17 (comment)

All queries are placed in a local queue (due to the fact that the MySQL/MariaDB protocol is synchronous).

therefore I think we should initiate a new mariasql object for each graphql request, reuuse during the graphql request and then destroy it after the request has been parsed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants