How to increase connection pool in node-red-node-sqlite node?

Hi Forum and fellow devs and contributors,
Just wanted to know if I can increase the connection pool? I dont have any option to do it in the node configuration. Please Help !!!

I don't think the underlying library node-sqlite3 has a pool at all...

Thanks for the help. Anyways @dceejay I have another additional question when I performed a stress test by injecting many data using sqlite node my database is getting locked. In this case any suggestions to prevent those errors?

Are you sending data to the db via multiple nodes or is it all going through one node? Are you sending data quicker than the database driver can cope it?

I tend to think that if you need to stress test it then you should not be using sqlite.


Well there is another library called better-sqlite3 - that may be API compatible that claims to be a lot faster... so if someone/anyone wanted to clone the repo and create a tested Pull request that would be excellent... (I haven't used sqlite in a long time so not in a position to pick this up just now - but happy to look at a pull request).

1 Like

Yes @Colin I am kinda stress testing it to know it capability. Indeed I am sending data quicker that it can handle to find the threshold so that I can customize my application accordingly.

The important question was:

As that would likely be the reason for locks

Yes I am sending data via multiple nodes. In this case what reason could that be?

Sqlite is poor at handling multiple connections, it's simple underlying design makes it unsuitable for such tasks

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.