Back

<SOLVED>Request is taking longer to process, between 6-10 second

  • 0
  • Self Hosted
  • Flutter
Binyamin
24 Jul, 2023, 19:25

When you actually got the slow requests?

TL;DR
User is experiencing slow processing times for requests, specifically between 6-10 seconds. Some requests even fail. User mentions that anything over 2 seconds is considered slow. They suggest running a load test on the endpoint using oha (a tool). They provide a code example for running the load test. They mention that the Flutter app is the only one experiencing slowness, while all other apps on the same network are working fine. They mention that they are using the same Wi-Fi on their laptop and it is working fine. They suggest downloading and activating a specific app on their Android phone. They mention that the issue occurs regardless of
Vedsaga
24 Jul, 2023, 19:26

umm, very wired honestly... actually yestarday I reset the phone and when runing the app via Dev mode it happening

Vedsaga
24 Jul, 2023, 19:26

I mean via flutter app*

Binyamin
24 Jul, 2023, 19:26

Maybe it was something temporary?

Vedsaga
24 Jul, 2023, 19:26

let me try running on diffrent Mobile app

Binyamin
24 Jul, 2023, 19:27

Or a different network

Vedsaga
24 Jul, 2023, 19:27

ahh nope, there is no diff in that phone even when switching form Wifi to mobile network same issue

Binyamin
24 Jul, 2023, 19:29

Can you share the code in which you're doing the request?

Binyamin
24 Jul, 2023, 19:29

And the view part?

Vedsaga
24 Jul, 2023, 19:30

actually I just tried with Mobile network it works well

Vedsaga
24 Jul, 2023, 19:31

umm, for some reason Wifi network it's being slow for certain request and for some request it's faster

Binyamin
24 Jul, 2023, 19:31

Maybe it has to do something with the DNS

Vedsaga
24 Jul, 2023, 19:31

it's all nested πŸ˜… because building it actually app

Binyamin
24 Jul, 2023, 19:31

This is <:android:1108648016468000838> Android phone?

Vedsaga
24 Jul, 2023, 19:31

yap

Binyamin
24 Jul, 2023, 19:32
Vedsaga
24 Jul, 2023, 19:32

but, I am using same wifi ( ether net) on laptop and working fine

Binyamin
24 Jul, 2023, 19:32

This's Cloudflare app.

Vedsaga
24 Jul, 2023, 19:33

mm, btw just only flutter app is working slow and all other app in same network working fine

Binyamin
24 Jul, 2023, 19:34

I see

Vedsaga
24 Jul, 2023, 19:35

see, some request take longer and some are quicker

Binyamin
24 Jul, 2023, 19:38

Anything more then 2s you can consider to be slow.

Try to run load test on the endpoint You can use oha https://github.com/hatoo/oha

Like so:

TypeScript
oha "https://api.monofyi.com/v1/databases/64b403562105501ffe56/collections/64b4fabfa6ed7bb23b9b/documents?queries%5B%5D=startsWith%28%22vehicleNumber%22%2C+%5B%22b%22%5D%29" -H "Cookie: a_session_64b0fa7d5450983a87af_legacy=eyJpZCI6IjY0YjRkODRhMmJkNmMzNDFkNGRmIiwic2VjcmV0IjoiMTI1NzBlMjA3YTZlYmRmNDRiYzhlMTNhYTM5M2U0YWUxNzRjODYyYzA3MjgyZDkxNzdkYzE1NjIyOWRkMzIxMWE2ZGZlZGIyMjNmZDEyMjdiNDg2MDM1MzhlZjYzOTMwZWQyOTVhYzJhOGIwMjVkZDVmNGYzMzliNDJjODQxNDk3ZTAxNGQwMTQxNDExZTEyZmYwYmI1MDMxMGNiYWY4NzI5ODgzY2Q1ZGU4ZDUxODIxNTQwZWY5NjYwMWY0M2Q2OTNmNGY1MDhmMmEwNjEwN2ZmOWViOGM2NzgwZjk1ZTVlZWUxOWM5YzNhY2ZkNjhjZGU2NTUyZWYwNDY2NTQzZSJ9;a_session_64b0fa7d5450983a87af=eyJpZCI6IjY0YjRkODRhMmJkNmMzNDFkNGRmIiwic2VjcmV0IjoiMTI1NzBlMjA3YTZlYmRmNDRiYzhlMTNhYTM5M2U0YWUxNzRjODYyYzA3MjgyZDkxNzdkYzE1NjIyOWRkMzIxMWE2ZGZlZGIyMjNmZDEyMjdiNDg2MDM1MzhlZjYzOTMwZWQyOTVhYzJhOGIwMjVkZDVmNGYzMzliNDJjODQxNDk3ZTAxNGQwMTQxNDExZTEyZmYwYmI1MDMxMGNiYWY4NzI5ODgzY2Q1ZGU4ZDUxODIxNTQwZWY5NjYwMWY0M2Q2OTNmNGY1MDhmMmEwNjEwN2ZmOWViOGM2NzgwZjk1ZTVlZWUxOWM5YzNhY2ZkNjhjZGU2NTUyZWYwNDY2NTQzZSJ9" -H "Content-Type: application/json" -H "x-appwrite-project:64b0fa7d5450983a87af" -z 60s
Vedsaga
24 Jul, 2023, 19:38

some even fails

Vedsaga
24 Jul, 2023, 19:39

this is cool, I will check this out...

Vedsaga
25 Jul, 2023, 06:30

<SOLVED>Request is taking longer to process, between 6-10 second

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