I am new to Node and CouchDB need help.
I have created a server written in node.js. This server talks to CouchDB and I am using the cradle module to handle the database operations. I have also used the journey module to route the urls.
I have hosted this server on a windows machine with log messages sent to console (MS DOS prompt) using console.log() function.
The server runs fine, but for sometimes, intermittently, the client requests hangs and nothing happens after that. Only when I hit some key on the console all the requests submitted after the hung situation process without any problem.
I am not able to understand why this happens. Is this problem because of some connectivity issues? If so is this anything to do with cradle.js?
Any help or pointers please…
console.log() is a blocking call. The more you log, the more likely you’ll get lag from the server while it writes data to the console.
You can use a non-blocking logger like the one provided by Sencha Connect