阅读背景:

使用sequelize阻塞其他用户的Nodejs和异步调用mysql

来源:互联网 

this is my first post here, i hope im doing it right. Im learning nodejs for a proyect i want to do, and im using node to write a web service. i followed a tutorial and got to a working web service, but i had to write the part to connect to the db myself. Problem is, it returns data, but it also blocks everything else. If query 1 takes 20 seconds, query 2 takes only 3 seconds, and i call query 1 and then query 2, query 2 will only be shown after query 1 is done, blocking all potential users! Here is part of my code, if you need more just askthis is my first post here, i hope im doing it




你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: