File tree Expand file tree Collapse file tree 1 file changed +5
-1
lines changed
sdk/python/feast/infra/registry Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -202,7 +202,11 @@ def __init__(
202202 repo_path : Optional [Path ],
203203 ):
204204 assert registry_config is not None , "SqlRegistry needs a valid registry_config"
205- self .engine : Engine = create_engine (registry_config .path , echo = False )
205+ # pool_recycle will recycle connections after the given number of seconds has passed
206+ # This is to avoid automatic disconnections when no activity is detected on connection
207+ self .engine : Engine = create_engine (
208+ registry_config .path , echo = False , pool_recycle = 3600
209+ )
206210 metadata .create_all (self .engine )
207211 self .cached_registry_proto = self .proto ()
208212 proto_registry_utils .init_project_metadata (self .cached_registry_proto , project )
You can’t perform that action at this time.
0 commit comments