mariano/node-db-mysql — Issue #59: mysql_real_query is blocking
Author: ErikDubbelboer
Created: 2012-03-02 10:25:29+00:00
State: open

Hi,

It seems you are using mysql_real_query() which is a blocking call. Nodejs only runs a maximum of 4 threads so running 4 slow queries using your library will block everything else.

You can try this by running 4 `SELECT SLEEP(10)` queries and then doing some fast query. The fast query will only run after the 4 slow queries are done. Example code here: https://gist.github.com/1957486

(The example code actually causes a Segmentation fault but if you want I can create another ticket for that)