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

High number search queries on off #5355

Open
raphael0202 opened this issue Jun 11, 2024 · 6 comments
Open

High number search queries on off #5355

raphael0202 opened this issue Jun 11, 2024 · 6 comments

Comments

@raphael0202
Copy link

I found out in the logs that Smoothie app may send a high amount of search queries in a short timeframe:

IPADDR - - [11/Jun/2024:11:47:41 +0000] "POST /cgi/search.pl HTTP/1.0" 200 72 "-" "- Smoothie - OpenFoodFacts - 4.13.1+1279 - android+SP1A.210812.016.G975FXXSGHWC1 - https://world.openfoodfacts.org/ -  - Smoothie - OpenFoodFacts - 4.13.1+1279 - android+SP1A.210812.016.G975FXXSGHWC1 - 68700e1f-aa28-49dc-b300-d34cc387bad8" 0/28075
IPADDR - - [11/Jun/2024:11:47:41 +0000] "POST /cgi/search.pl HTTP/1.0" 200 72 "-" "- Smoothie - OpenFoodFacts - 4.13.1+1279 - android+SP1A.210812.016.G975FXXSGHWC1 - https://world.openfoodfacts.org/ -  - Smoothie - OpenFoodFacts - 4.13.1+1279 - android+SP1A.210812.016.G975FXXSGHWC1 - 68700e1f-aa28-49dc-b300-d34cc387bad8" 0/25631
IPADDR - - [11/Jun/2024:11:47:41 +0000] "POST /cgi/search.pl HTTP/1.0" 200 72 "-" "- Smoothie - OpenFoodFacts - 4.13.1+1279 - android+SP1A.210812.016.G975FXXSGHWC1 - https://world.openfoodfacts.org/ -  - Smoothie - OpenFoodFacts - 4.13.1+1279 - android+SP1A.210812.016.G975FXXSGHWC1 - 68700e1f-aa28-49dc-b300-d34cc387bad8" 0/32324
IPADDR - - [11/Jun/2024:11:47:45 +0000] "POST /cgi/search.pl HTTP/1.0" 200 74 "-" "- Smoothie - OpenFoodFacts - 4.13.1+1279 - android+SP1A.210812.016.G975FXXSGHWC1 - https://world.openfoodfacts.org/ -  - Smoothie - OpenFoodFacts - 4.13.1+1279 - android+SP1A.210812.016.G975FXXSGHWC1 - 68700e1f-aa28-49dc-b300-d34cc387bad8" 0/6523
IPADDR - - [11/Jun/2024:11:47:45 +0000] "POST /cgi/search.pl HTTP/1.0" 200 74 "-" "- Smoothie - OpenFoodFacts - 4.13.1+1279 - android+SP1A.210812.016.G975FXXSGHWC1 - https://world.openfoodfacts.org/ -  - Smoothie - OpenFoodFacts - 4.13.1+1279 - android+SP1A.210812.016.G975FXXSGHWC1 - 68700e1f-aa28-49dc-b300-d34cc387bad8" 0/7089
IPADDR - - [11/Jun/2024:11:47:45 +0000] "POST /cgi/search.pl HTTP/1.0" 200 74 "-" "- Smoothie - OpenFoodFacts - 4.13.1+1279 - android+SP1A.210812.016.G975FXXSGHWC1 - https://world.openfoodfacts.org/ -  - Smoothie - OpenFoodFacts - 4.13.1+1279 - android+SP1A.210812.016.G975FXXSGHWC1 - 68700e1f-aa28-49dc-b300-d34cc387bad8" 0/19965
IPADDR - - [11/Jun/2024:11:47:46 +0000] "POST /cgi/search.pl HTTP/1.0" 200 74 "-" "- Smoothie - OpenFoodFacts - 4.13.1+1279 - android+SP1A.210812.016.G975FXXSGHWC1 - https://world.openfoodfacts.org/ -  - Smoothie - OpenFoodFacts - 4.13.1+1279 - android+SP1A.210812.016.G975FXXSGHWC1 - 68700e1f-aa28-49dc-b300-d34cc387bad8" 0/6032
IPADDR - - [11/Jun/2024:11:47:46 +0000] "POST /cgi/search.pl HTTP/1.0" 200 74 "-" "- Smoothie - OpenFoodFacts - 4.13.1+1279 - android+SP1A.210812.016.G975FXXSGHWC1 - https://world.openfoodfacts.org/ -  - Smoothie - OpenFoodFacts - 4.13.1+1279 - android+SP1A.210812.016.G975FXXSGHWC1 - 68700e1f-aa28-49dc-b300-d34cc387bad8" 0/7255
IPADDR - - [11/Jun/2024:11:47:46 +0000] "POST /cgi/search.pl HTTP/1.0" 200 74 "-" "- Smoothie - OpenFoodFacts - 4.13.1+1279 - android+SP1A.210812.016.G975FXXSGHWC1 - https://world.openfoodfacts.org/ -  - Smoothie - OpenFoodFacts - 4.13.1+1279 - android+SP1A.210812.016.G975FXXSGHWC1 - 68700e1f-aa28-49dc-b300-d34cc387bad8" 0/7036
IPADDR - - [11/Jun/2024:11:47:41 +0000] "POST /cgi/search.pl HTTP/1.0" 200 72 "-" "- Smoothie - OpenFoodFacts - 4.13.1+1279 - android+SP1A.210812.016.G975FXXSGHWC1 - https://world.openfoodfacts.org/ -  - Smoothie - OpenFoodFacts - 4.13.1+1279 - android+SP1A.210812.016.G975FXXSGHWC1 - 68700e1f-aa28-49dc-b300-d34cc387bad8" 6/6415146
IPADDR - - [11/Jun/2024:11:47:48 +0000] "POST /cgi/search.pl HTTP/1.0" 200 74 "-" "- Smoothie - OpenFoodFacts - 4.13.1+1279 - android+SP1A.210812.016.G975FXXSGHWC1 - https://world.openfoodfacts.org/ -  - Smoothie - OpenFoodFacts - 4.13.1+1279 - android+SP1A.210812.016.G975FXXSGHWC1 - 68700e1f-aa28-49dc-b300-d34cc387bad8" 0/7321
IPADDR - - [11/Jun/2024:11:47:48 +0000] "POST /cgi/search.pl HTTP/1.0" 200 74 "-" "- Smoothie - OpenFoodFacts - 4.13.1+1279 - android+SP1A.210812.016.G975FXXSGHWC1 - https://world.openfoodfacts.org/ -  - Smoothie - OpenFoodFacts - 4.13.1+1279 - android+SP1A.210812.016.G975FXXSGHWC1 - 68700e1f-aa28-49dc-b300-d34cc387bad8" 0/7236
IPADDR - - [11/Jun/2024:11:47:48 +0000] "POST /cgi/search.pl HTTP/1.0" 200 74 "-" "- Smoothie - OpenFoodFacts - 4.13.1+1279 - android+SP1A.210812.016.G975FXXSGHWC1 - https://world.openfoodfacts.org/ -  - Smoothie - OpenFoodFacts - 4.13.1+1279 - android+SP1A.210812.016.G975FXXSGHWC1 - 68700e1f-aa28-49dc-b300-d34cc387bad8" 0/7397
IPADDR - - [11/Jun/2024:11:47:48 +0000] "POST /cgi/search.pl HTTP/1.0" 200 74 "-" "- Smoothie - OpenFoodFacts - 4.13.1+1279 - android+SP1A.210812.016.G975FXXSGHWC1 - https://world.openfoodfacts.org/ -  - Smoothie - OpenFoodFacts - 4.13.1+1279 - android+SP1A.210812.016.G975FXXSGHWC1 - 68700e1f-aa28-49dc-b300-d34cc387bad8" 0/20328
IPADDR - - [11/Jun/2024:11:47:50 +0000] "POST /cgi/search.pl HTTP/1.0" 200 74 "-" "- Smoothie - OpenFoodFacts - 4.13.1+1279 - android+SP1A.210812.016.G975FXXSGHWC1 - https://world.openfoodfacts.org/ -  - Smoothie - OpenFoodFacts - 4.13.1+1279 - android+SP1A.210812.016.G975FXXSGHWC1 - 68700e1f-aa28-49dc-b300-d34cc387bad8" 0/6618
IPADDR - - [11/Jun/2024:11:47:50 +0000] "POST /cgi/search.pl HTTP/1.0" 200 74 "-" "- Smoothie - OpenFoodFacts - 4.13.1+1279 - android+SP1A.210812.016.G975FXXSGHWC1 - https://world.openfoodfacts.org/ -  - Smoothie - OpenFoodFacts - 4.13.1+1279 - android+SP1A.210812.016.G975FXXSGHWC1 - 68700e1f-aa28-49dc-b300-d34cc387bad8" 0/7064
IPADDR - - [11/Jun/2024:11:47:50 +0000] "POST /cgi/search.pl HTTP/1.0" 200 74 "-" "- Smoothie - OpenFoodFacts - 4.13.1+1279 - android+SP1A.210812.016.G975FXXSGHWC1 - https://world.openfoodfacts.org/ -  - Smoothie - OpenFoodFacts - 4.13.1+1279 - android+SP1A.210812.016.G975FXXSGHWC1 - 68700e1f-aa28-49dc-b300-d34cc387bad8" 0/6844
IPADDR - - [11/Jun/2024:11:47:50 +0000] "POST /cgi/search.pl HTTP/1.0" 200 74 "-" "- Smoothie - OpenFoodFacts - 4.13.1+1279 - android+SP1A.210812.016.G975FXXSGHWC1 - https://world.openfoodfacts.org/ -  - Smoothie - OpenFoodFacts - 4.13.1+1279 - android+SP1A.210812.016.G975FXXSGHWC1 - 68700e1f-aa28-49dc-b300-d34cc387bad8" 0/20934
IPADDR - - [11/Jun/2024:11:47:45 +0000] "POST /cgi/search.pl HTTP/1.0" 200 72 "-" "- Smoothie - OpenFoodFacts - 4.13.1+1279 - android+SP1A.210812.016.G975FXXSGHWC1 - https://world.openfoodfacts.org/ -  - Smoothie - OpenFoodFacts - 4.13.1+1279 - android+SP1A.210812.016.G975FXXSGHWC1 - 68700e1f-aa28-49dc-b300-d34cc387bad8" 6/6779922
IPADDR - - [11/Jun/2024:11:47:46 +0000] "POST /cgi/search.pl HTTP/1.0" 200 72 "-" "- Smoothie - OpenFoodFacts - 4.13.1+1279 - android+SP1A.210812.016.G975FXXSGHWC1 - https://world.openfoodfacts.org/ -  - Smoothie - OpenFoodFacts - 4.13.1+1279 - android+SP1A.210812.016.G975FXXSGHWC1 - 68700e1f-aa28-49dc-b300-d34cc387bad8" 6/6724017
IPADDR - - [11/Jun/2024:11:47:58 +0000] "POST /cgi/search.pl HTTP/1.0" 200 74 "-" "- Smoothie - OpenFoodFacts - 4.13.1+1279 - android+SP1A.210812.016.G975FXXSGHWC1 - https://world.openfoodfacts.org/ -  - Smoothie - OpenFoodFacts - 4.13.1+1279 - android+SP1A.210812.016.G975FXXSGHWC1 - 68700e1f-aa28-49dc-b300-d34cc387bad8" 0/7077
IPADDR - - [11/Jun/2024:11:47:58 +0000] "POST /cgi/search.pl HTTP/1.0" 200 74 "-" "- Smoothie - OpenFoodFacts - 4.13.1+1279 - android+SP1A.210812.016.G975FXXSGHWC1 - https://world.openfoodfacts.org/ -  - Smoothie - OpenFoodFacts - 4.13.1+1279 - android+SP1A.210812.016.G975FXXSGHWC1 - 68700e1f-aa28-49dc-b300-d34cc387bad8" 0/7933
IPADDR - - [11/Jun/2024:11:47:58 +0000] "POST /cgi/search.pl HTTP/1.0" 200 74 "-" "- Smoothie - OpenFoodFacts - 4.13.1+1279 - android+SP1A.210812.016.G975FXXSGHWC1 - https://world.openfoodfacts.org/ -  - Smoothie - OpenFoodFacts - 4.13.1+1279 - android+SP1A.210812.016.G975FXXSGHWC1 - 68700e1f-aa28-49dc-b300-d34cc387bad8" 0/6421
IPADDR - - [11/Jun/2024:11:47:58 +0000] "POST /cgi/search.pl HTTP/1.0" 200 74 "-" "- Smoothie - OpenFoodFacts - 4.13.1+1279 - android+SP1A.210812.016.G975FXXSGHWC1 - https://world.openfoodfacts.org/ -  - Smoothie - OpenFoodFacts - 4.13.1+1279 - android+SP1A.210812.016.G975FXXSGHWC1 - 68700e1f-aa28-49dc-b300-d34cc387bad8" 0/6695

There is probably a bug underneath.

@teolemon
Copy link
Member

Hypothesis: Hidden in dev mode, we have the offline mode, which could be doing such queries, but we have never advertised it
@g123k

@monsieurtanuki
Copy link
Contributor

Just had this issue: when you go to the "welcome monsieurtanuki" page, we automatically compute the number of products you added, you modified, you photographed, you need to complete:

  • each time you go to this page, it's triggered
  • each time those are four search.pl queries in parallel

image

<!DOCTYPE html><html><head><meta name="robots" content="noindex"></head><body>
<h1>TOO MANY REQUESTS</h1>
<p>You are sending too many requests to our servers.</p><p>To know more about the rate limits we enforce, please refer to the <a href="https://openfoodfacts.github.io/openfoodfacts-server/api/#rate-limits">rate-limit section in our documentation</a>.</p>
<p>If you need to download data about a large number of products, it's preferable to <a href="https://world.openfoodfacts.org/data">download a data dump</a>. If this is unexpected, contact us on Slack or write us an email at <a href="mailto:[email protected]">[email protected]</a>.</p>
</body></html>

@g123k
Copy link
Collaborator

g123k commented Jun 16, 2024

We have a project to redesign this tab and I think we should do it, even without the real concept of "For me".
And in this particular case, it would make sense to cache data and even give some range (e.g. : instead of 7, let's say between 5 and 10), which would be OK until the next refresh

@teolemon
Copy link
Member

@raphael0202 could you put the search parameters ? It would help us pinpoint which part of the app is faulty.
We could also add more instrumentation Smoothie side.

@g123k
Copy link
Collaborator

g123k commented Jun 17, 2024

FYI We can track all network requests with the Flutter DevTools.
But there is nothing suspicious on the search and the profile.
It might be related to poor network conditions.

Screenshot 2024-06-17 at 15 40 16

@raphael0202
Copy link
Author

@raphael0202 could you put the search parameters ? It would help us pinpoint which part of the app is faulty.

No it's a POST request, we don't have access from nginx logs to the content

@teolemon teolemon removed the 🐛 bug Something isn't working label Oct 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: 💬 To discuss and validate
Development

No branches or pull requests

4 participants