azukaar / Cosmos-Server

☁️ The Most Secure and Easy Selfhosted Home Server. Take control of your data and privacy without sacrificing security and stability (Authentication, anti-DDOS, anti-bot)
https://cosmos-cloud.io
Other
2.97k stars 105 forks source link

[BUG]: Server responds with too many requests #216

Closed likeadragonmaid closed 3 months ago

likeadragonmaid commented 3 months ago

What happened?

When using nextcloud and doing new backups nextcloud client(s) makes too many requests in short amount of time resulting in server responding with "Too many requests" error for every application hosted via cosmos.

What should have happened?

Provide an option to disable this behaviour.

How to reproduce the bug?

Use nextcloud to upload large amount of files in a short amount of time.

Relevant log output

No response

Other details

No response

System details

azukaar commented 3 months ago

That is expected, simply instruct the smart shield to be more lenient on detection. You can manually change the shield settings on the Nextcloud URL (make sure you dont select the DAV routes) and then in the security tab

tarbib commented 3 months ago

@azukaar Hello ! I ran into the same issue. I had to disable the smart shield on the URL (servapp.domain.com) though :( changing settings to lenient did not work. The remaining issue is I'm still locked out on domain.com where cosmos UI is accessible. I don't see how to remove smartshield on cosmos URL. Thanks !

Wiz0r commented 2 months ago

Facing the same issue.

Is there a at least a workaround for solving this problem?

azukaar commented 2 months ago

If Lenient is not enough You can change the "Per User Request Limit " to something higher, default is 6000, try 20000 for example

Wiz0r commented 2 months ago

Thank you for your quick response.

The Problem was, that I could not enter the cosmos UI to make changes in the "URL" settings because of the "Too many requests" message. I disabled shield in every app via cosmos config file and restart cosmos. Then I was able to enter the cosmos UI again.

I changed "Per User Request Limit" for nextcloud to a much higher limit hoping this will prevent this massage in future.

Currently i am a bit unsure why the an app setting prevented me from logging into the cosmos UI.

azukaar commented 2 months ago

You dont need to disable the shield, if you restart it unblocks things, you might have had some cache issues or somehting

Wiz0r commented 2 months ago

Good to know. Thank you.