Search code examples
node.jsoracleubuntu-14.04node-oracledb

SESSIONS_PER_USER limit with nodejs


I've been struggling with this issue for a couple of weeks:

For some reason, our nodejs script which is connecting to a oracle database in another machine started erroring with SESSIONS_PER_USER limit, but we don't have any other connection opened to the database. I tried another user we have but it returns the exact same error.

The most weird part is that this service has been running for weeks and it is the first time it gives us this error.

We use the oracledb (https://github.com/oracle/node-oracledb) module to connect to the database.

We asked the support team but apparently they can use our users to connect the db, but when it comes to use the accounts in our machine (ubuntu server 14.04) it gives this error. I tried searching for a possible "cached" sessions or connections inside our machine but I haven't found a lot of help regarding this matter on google...

I would really appreciate if someone can give me some help regarding this issue, since I don't know what else I can do about.

Thanks in advance.


Solution

  • I proceed to answer this question myself, since what happened is that the IT team changed some configuration the exact day we started having problems... User config from UNLIMITED requests to 2. It happened that in our code we were using an async (nodejs) method called eachLimit, where you can assign a limit iteration count, and it was 2 but somehow made it crash anyways (even with the limit being 2).

    The solution: removing the iterator and doing it manually 1 by 1 (only 4 elements), anyways it is still harsh, since we have to do this task every day.

    Thanks for your help guys!