Re:Ask HN: How to upgrade small pet project and make it comm...
by llccbb on Monday January 22, 2018 @11:45PM
(#16211067)
Have you had any success or failures with the single-threadedness of sqlite and multiple simultaneous users? Does buffering interactions using gunicorn help solve this? I ask because I love using sqlite for some localhost programs but always transfer away to postgres once I push the app to a server/VM. Thankfully sqlalchemy makes the transition possible with just a config change and no real retooling of the codebase.
Re:Ask HN: How to upgrade small pet project and make it comm...
by ioddly on Tuesday January 23, 2018 @03:03AM
(#16211829)
I mostly use it on low traffic applications, but it depends on what those simultaneous users are doing and how many of them there are.
Multiple processes can access a single sqlite DB, they just can't write to it at the same time. So yeah, gunicorn (or any forking server) should help.
There are ways you could simulate a lot of users at once, if you're worried about it.
For running multiple processes, I use gunicorn with an nginx proxy. Requires little to no additional code added to your application.