When Caddy reloads (configuration change), old storage connections are not properly closed, leading to resource leaks. Each reload creates new storage instances while old ones remain open.
In souin/plugins/caddy/app.go:
func (s SouinApp) Start() error {
core.ResetRegisteredStorages() // Only clears the map
_, _ = up.Delete(stored_providers_key)
_, _ = up.LoadOrStore(stored_providers_key, newStorageProvider())
return nil
}
The Start() method is called on every Caddy configuration reload. While ResetRegisteredStorages() clears the registered storage map, the actual storage connections (e.g., Badger DB) are never closed.
When Caddy reloads (configuration change), old storage connections are not properly closed, leading to resource leaks. Each reload creates new storage instances while old ones remain open.
In
souin/plugins/caddy/app.go:The
Start()method is called on every Caddy configuration reload. WhileResetRegisteredStorages()clears the registered storage map, the actual storage connections (e.g., Badger DB) are never closed.