Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix 429 response in ServiceApiController.php #690

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

HolgerHees
Copy link
Contributor

In my setup I have ~ 300 passwords. During initial load most of the favicon requests are answered with a 429.

In the documentation of nextcloud the description of Rate limit is "Rate limiting should be used on expensive or security sensitive functions (e.g. password resets) to increase the overall security of your application.". I think favicon is not expensive and security sensitive. So I believe, increasing the rate limit should not be a problem.

A rate limit of 500 should also be fine, because the browser itself is not requesting more then 5 per second.

@marius-wieschollek
Copy link
Owner

A rate limit of 500 is more than enough to completely bring down a raspberry pi. Favicons are also not only requested by the browser but also by other apps. Several of them load all icons at once which is the reason why this limit was added.

@HolgerHees
Copy link
Contributor Author

But what is the solution. Not loading 80% of the favicons can't be the solution.

I mean also that a raspberry pi is not a perfect fit to a full cloud service. Just a entry level hardware to get something running.

and if you have a lot of data like ~100-300 of passwords, you should think about better hardware. The same happens for photos and file previews. Just imagine if we would also introduce a rate limit there, just to make it run on a raspberry pi.

everyone should be aware that a raspberry pi is just a entry level for nextcloud.

currently, every time I open passwords, my access logs a spammed with >250 lines of 429 error messages.

a solution like throttling on client side will also not work. This would mean the loading will take 5 minutes.

@marius-wieschollek
Copy link
Owner

The solution will have to be to implement the same throttling here in the favicon service: https://github.com/marius-wieschollek/passwords/blob/master/src/js/Services/FaviconService.js

@marius-wieschollek
Copy link
Owner

I have worked a bit on this today, i will see if i can finish support for throttled endpoints in the client tomorrow.

@HolgerHees
Copy link
Contributor Author

Thank you for addressing this issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants