@kyleg, If you will not close the connection then you’ll face memory leak and too many opened connections to db what may lead to DoS.
As @spand mentions - use connection pool and setup it to reuse connections.
Or, as a workaround - create a separate thread/cooutine which will keep open transaction just to keep sqlite in-memory db alive, but afaik where are problems with concurrent work with SQLite.