mirror of
https://github.com/osm-search/Nominatim.git
synced 2026-02-15 10:57:58 +00:00
enable connection pools for sqlite
Connecting is reasonably expensive because the spatialite extension needs to be loaded. Disable pooling for tests because there is some memory leak when quickly opening and closing QueuePools with sqlite connections.
This commit is contained in:
@@ -198,7 +198,8 @@ def frontend(request, event_loop, tmp_path):
|
||||
db, options))
|
||||
return napi.NominatimAPI(Path('/invalid'),
|
||||
{'NOMINATIM_DATABASE_DSN': f"sqlite:dbname={db}",
|
||||
'NOMINATIM_USE_US_TIGER_DATA': 'yes'})
|
||||
'NOMINATIM_USE_US_TIGER_DATA': 'yes',
|
||||
'NOMINATIM_API_POOL_SIZE': '0'})
|
||||
elif request.param == 'postgres_db':
|
||||
def mkapi(apiobj, options=None):
|
||||
return apiobj.api
|
||||
|
||||
Reference in New Issue
Block a user