You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Make the bulk import rate limit (5/hour per user) adjustable by an admin #1638
Problem
Every bulk import shares one import: rate bucket that is hardcoded to 5 imports per hour per user (src/app/api/import/route.ts, src/app/api/import/csv/route.ts, src/lib/import/record-import-route.ts). On a self-hosted server, a household member who is retrying or splitting a CSV gets "Too many imports this hour (limit 5)" and has to wait an hour. The only workaround is deleting their row from rate_limits by hand.
Request
Let a server admin change that limit, for example with an admin setting or an environment variable such as IMPORT_RATE_LIMIT_PER_HOUR. That would match the existing INSIGHTS_RATE_LIMIT_PER_HOUR. Keep the default at 5 so nothing changes unless an admin opts in.
Nice to have
An admin action to reset one user's import counter.
The limit shown in the rate-limit message and the API docs, read from the setting.
Thanks @camiracode, that's a fair one. The hourly limit on CSV and JSON imports is there to keep a runaway script from filling the database, not to make a household wait.
1.50.0 on Saturday 5 December adds IMPORT_RATE_LIMIT_PER_HOUR. The default stays at 5, and the "too many imports" message and the API docs read the value you set. I'm leaving out a per-user reset button: raising the limit covers the retry case without adding another admin screen.
Activity
MBombeck commentedon Nov 27, 2026
Thanks @camiracode, that's a fair one. The hourly limit on CSV and JSON imports is there to keep a runaway script from filling the database, not to make a household wait.
1.50.0 on Saturday 5 December adds
IMPORT_RATE_LIMIT_PER_HOUR. The default stays at 5, and the "too many imports" message and the API docs read the value you set. I'm leaving out a per-user reset button: raising the limit covers the retry case without adding another admin screen.Refs #1638