/renter/files API returns error 500 when tens of thousands of files are being stored.
BUG REPORT
Stack Trace or error message
API calls to /renter/files endpoint time out and eventually get a error 500 response. Eventually increase timeout to 5mins or so.
Expected Behavior
Cache the stored files in memory or don't make /renter/files list all files individually.
Observed Behavior
Timeout on API endpoint call.
How to reproduce it (as minimally and precisely as possible)
Use SiaStream to backup a complete NAS with 60'000+ files, observe /renter/files timeouts to the API.
# time /share/Public/sia-data/siac renter uploads
real 2m43.434s
user 0m2.597s
sys 0m0.761s
Environment
- Sia version: 1.5.0
- OS: Linux (QNAP TS4.4.3)
Edited by NexusIT