Hello!I was studying pool connection and find any examples in internet.In my code, I writing thishttps://preview.redd.it/oenvthrnez251.png?width=648&format=png&auto=webp&s=8a53b50501fdba3bddd27522a9cb43b1dfd8a2e6Well... is this correctly?Ever I call a connection of a pool, the release is done automatically?In this file is the only place I call connection.release()My models, for example:https://preview.redd.it/40gnzym7fz251.png?width=672&format=png&auto=webp&s=deea07ae4be145570bc453ebe99adf244e12ded9And my controller:https://preview.redd.it/xsu53grefz251.png?width=674&format=png&auto=webp&s=41734c930bef63c2590a84e2eb662af457496000In a blog, I read: " In fact, pool.query() is a shortcut for pool.getConnection() + connection.query() + connection.release()"But i dont know if this is correctly.I run a load test with k6, and this is the result (of this rout):https://preview.redd.it/jddw1zyxfz251.png?width=768&format=png&auto=webp&s=34874ec3c2e4528cb929f78e7619ad823e388ae9Well, I'm looking for a solution to be more relaxed about using the connection with the pool. Tip, suggestions and criticisms are very welcome!Ah yes, sorry for my english (I have to study this too :D )
Submitted June 05, 2020 at 01:04AM by Kcabrhel
No comments:
Post a Comment