on 2016 Jun 27 10:47 AM
I have a webserver running a Node.js v1.0.10 that connects to a SA16.
So, every page that needs data from the DB, opens a new connection and closes it at the end.
If I call more than one page at same time, I'll have more than one connection to the database.
The problem starts when I have multiple pages running at the same time and the first one calls the "connection.disconnect" method. At this time, all other connections are affected and all other pages get an connection error. It seems the connection.disconnect closes all opened connections.
I´m creating a new connection in every single page like the GitHub example:
var sqlanywhere = require('sqlanywhere');
var conn = sqlanywhere.createConnection();
var conn_params = {....};
conn.connect ...
conn.exec ...
conn.disconnect();
What am I doing wrong?
Thanks for your time!
Request clarification before answering.
Version 1.0.11 (just published to npm) should fix this issue.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
60 | |
10 | |
8 | |
8 | |
7 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.