#16582 [Bug]: Spendlog Cleanup not working - "spend_log_cleanup.py:153 - Error during cleanup: "
### What happened?
We have set up retention for Spendlog records, but old request are not being removed, log output shows: `11:38:13 - LiteLLM Proxy:ERROR: spend_log_cleanup.py:153 - Error during cleanup: ` without any relevant information
Our setup is run on Kubernetes with 2 replicas, we have redis to keep lock for cleanup. Our configuration:
``` env: SPEND_LOG_RUN_LOOPS: 1000 SPEND_LOG_CLEANUP_BATCH_SIZE: 50000
litellm_settings: cache: false cache_params: type: redis host: openai-proxy-redis-master port: 6379 password: xxxx
general_settings: maximum_spend_logs_retention_period: "180d" maximum_spend_logs_retention_interval: "1h" ```
### Relevant log output
```shell 12:28:17 - LiteLLM Proxy:INFO: spend_log_cleanup.py:33 - SpendLogCleanup initialized with batch size: 30000 12:28:15 - LiteLLM Proxy:DEBUG: proxy_server.py:2322 - _alerting_callbacks: {'master_key': 'XXX', 'maximum_spend_logs_retention_interval': '8m', 'maximum_spend_logs_retention_period': '180d'} 12:27:49 - LiteLLM Proxy:INFO: spend_log_cleanup.py:33 - SpendLogCleanup initialized with batch size: 30000 12:27:48 - LiteLLM Proxy:DEBUG: proxy_server.py:2322 - _alerting_callbacks: {'ma…