Back

High Amount of Requests

  • 1
  • Self Hosted
  • Web
Hexi
12 Apr, 2024, 09:56

High Amount of Requests. While its mainly for development so it shouldn't be that high.

(or my code is doodoo and secretly ddossing myself <:Kek:744145930357571634> )

TL;DR
Developers are experiencing a high number of requests on their server. To address this, they can implement a rate limit in the nginx configuration file. One developer identified that adding a password on the domain helped reduce the requests. Upgrading the appwrite stack and monitoring logs also helped mitigate the issue for some. Checking traefik access logs and analyzing endpoints hit by requests is advised. Additionally, they discussed Cloudflare settings, custom domains, and the possibility of circular request patterns causing the issue. The thread contained various suggestions and troubleshooting steps to investigate and resolve the high number of requests.
D5
12 Apr, 2024, 09:56

What's your code?

Hexi
12 Apr, 2024, 09:57

welll thats way way way too big to post here but I fetch each time when someone loads an page in server side their account

Hexi
12 Apr, 2024, 09:58

Still need to integrate the new ssr integration

Hexi
12 Apr, 2024, 09:58

But that cant be it as I am not requesting it milions of times <:Kek:744145930357571634>

Hexi
12 Apr, 2024, 13:58

Well it is possible thats why I showed the one from proxmox

darShan
13 Apr, 2024, 12:58

Do you a custom domain attached to any of your projects & is that domain proxied via Cloudflare?

D5
13 Apr, 2024, 13:07

Anyways as said, that should not make the request count higher

darShan
13 Apr, 2024, 13:08

possibly, but i tried this and did see a ton of 404s, same as the /_app. Thought I'd share.

D5
13 Apr, 2024, 13:31

And is that traffic being reflected in the console?

darShan
13 Apr, 2024, 16:11

i didn't see as such yet.

Steven
14 Apr, 2024, 15:49

I would turn on traefik access logs and use those to see what endpoints are being hit. Ideally, you would ship the logs to some solution that allows you to analyze the data

Steven
14 Apr, 2024, 15:49

Cc @Hexi

Hexi
14 Apr, 2024, 15:51

Yup i do

darShan
14 Apr, 2024, 15:52

I kinda had a similar issue, yday and today as well. While i was running on 1.4.13. Both the times, i upgraded to 1.5.4, migrated and restarted the appwrite stack, the phamtom requests stopped coming in. No idea if it was due to CF but only occurred when I added a domain to project that was proxied through CF.

Hexi
14 Apr, 2024, 15:53

Strange will need to look at the nginx logs probably

Hexi
15 Apr, 2024, 16:48

It suddenly stopped today.

D5
15 Apr, 2024, 20:56

But what about logs?

D5
15 Apr, 2024, 20:57

The computer resources were being crowded too, or only there?

Hexi
17 Apr, 2024, 14:48

Someone on the internet was sending lots of requests for no reason

Hexi
17 Apr, 2024, 14:48

just added an password on it on the domain

D5
17 Apr, 2024, 16:44

But a single user?

Babyo7_
17 Apr, 2024, 16:56

πŸ’€

Guri
17 Apr, 2024, 18:18

1M requests by single user ☠️ how

Binyamin
17 Apr, 2024, 18:40

You can also put rate limit in your nginx conf file

For 10 requests per second per IP πŸ‘‡

TypeScript
limit_req_zone $binary_remote_addr zone=appwrite:10m rate=10r/s; πŸ‘ˆ

server {
 ...

  location / {
        limit_req zone=appwrite burst=5; πŸ‘ˆ
        proxy_pass http://localhost;
        ...
  }
}

More then 10 requests per second from a given IP will be ignored with error.

Reply

Reply to this thread by joining our Discord

Reply on Discord

Need support?

Join our Discord

Get community support by joining our Discord server.

Join Discord

Get premium support

Join Appwrite Pro and get email support from our team.

Learn more