I can only speak from experience with my own web framework. Long running (background) processes keep their DB handle open (often for days on end). Web uses two different strategies: Occasional access is on-demand (XMLHttpRequest from JavaScript). Long running stuff keeps a websocket open, which means the web backend also keeps a database handle open.
I use PostgreSQL as the database. I usually connect via UDS (unix domain sockets), this is much faster and less resource intensive than TCP. Give PostgreSQL a try, it's (in my opinion) much better at dealing with hundreds of connections than SQLite, and it's also much more capable at dealing with large datasets and complicated queries¹
¹ Your application might not have reached that point yet. But that stuff has a tendency to sneak up on you. It's always better to switch to a "big" database rather sooner than later. PostgreSQL is easy to install. If you are using any kind of Linux, there's most likely a package waiting for you in your package manager.
In reply to Re: Database access and async web framework (like Mojolicious)
by cavac
in thread Database access and async web framework (like Mojolicious)
by bliako
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |