-
-
Notifications
You must be signed in to change notification settings - Fork 280
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
App makes 1000+ API queries for the same product in 5 minutes #4415
Comments
Not an isolated case, another example from another ip, we got 360 queries for this product from one ip in the last 5 minutes:
|
Other example from another ip for one other product:
|
I see this is 4.7.0, do you have an example with 4.8.0 (which is the current sable version)? |
Smoothie queries by ip address, in the last 1M web pages + API queries received by the server: tail -n 1000000 access_log | grep Smoothie | ./concatenate_by_ip.pl | tail -n 10
|
@g123k There are examples with 4.8.0 too
|
@stephanegigandet @g123k The good thing is that is does not seem systematic - very few users/IPs are concerned. Probably a loophole. Following are the places where we use
My hunch: either too generous robotoff calls, or continuous_scan_model or product_model. |
I managed to find a reproducible case for this product, edited at 19.14PM (CET), 2023-08-20. I replaced IP address and other private info for privacy.
Associated matomo events and actions: {"type":"action","pageTitle":"Opened product_page","pageIdAction":"2074668","serverTimePretty":"Aug 20, 2023 19:14:48","pageId":"82920795","timeSpent":19,"timeSpentPretty":"19s","pageviewPosition":"21","title":"Opened product_page","subtitle":"https://org.openfoodfacts.scanner","timestamp":1692558888}
{"type":"event","serverTimePretty":"Aug 20, 2023 19:14:49","pageId":"82920796","eventCategory":"product edit","eventAction":"BasicDetails","pageviewPosition":"21","timestamp":1692558889,"subtitle":"Category: \"product edit', Action: \"BasicDetails\"","eventName":"BasicDetails","eventValue":4770179110126}
{"type":"event","serverTimePretty":"Aug 20, 2023 19:15:05","pageId":"82920849","eventCategory":"product edit","eventAction":"BasicDetails","pageviewPosition":"21","timestamp":1692558905,"subtitle":"Category: \"product edit', Action: \"BasicDetails\"","eventName":"BasicDetails-saved","eventValue":4770179110126}
{"type":"action","pageTitle":"Opened product_page","pageIdAction":"2074668","serverTimePretty":"Aug 20, 2023 19:15:07","pageId":"82920850","timeSpent":15,"timeSpentPretty":"15s","pageviewPosition":"22","title":"Opened product_page","subtitle":"https://org.openfoodfacts.scanner","timestamp":1692558907}
{"type":"event","serverTimePretty":"Aug 20, 2023 19:15:09","pageId":"82920851","eventCategory":"product edit","eventAction":"openProductEditPage","pageviewPosition":"22","timestamp":1692558909,"subtitle":"Category: \"product edit', Action: \"openProductEditPage\"","eventName":"openProductEditPage","eventValue":4770179110096}
{"type":"event","serverTimePretty":"Aug 20, 2023 19:15:10","pageId":"82920852","eventCategory":"product edit","eventAction":"BasicDetails","pageviewPosition":"22","timestamp":1692558910,"subtitle":"Category: \"product edit', Action: \"BasicDetails\"","eventName":"BasicDetails","eventValue":4770179110096}
{"type":"event","serverTimePretty":"Aug 20, 2023 19:15:14","pageId":"82920890","eventCategory":"product edit","eventAction":"BasicDetails","pageviewPosition":"22","timestamp":1692558914,"subtitle":"Category: \"product edit', Action: \"BasicDetails\"","eventName":"BasicDetails-saved","eventValue":4770179110096}
{"type":"action","pageTitle":"Opened product_page","pageIdAction":"2074668","serverTimePretty":"Aug 20, 2023 19:15:22","pageId":"82920891","timeSpent":4,"timeSpentPretty":"4s","pageviewPosition":"23","title":"Opened product_page","subtitle":"https://org.openfoodfacts.scanner","timestamp":1692558922} And here is the server changelog for this product:
So it looks like we started to make many requests after hitting the edit page, before saving. |
@stephanegigandet I assume that one year later we don't have this issue anymore, do we? |
While investigating server slowness, I found one IP that made 1200 API queries (out of the last 100k queries we receveid in total) for exactly the same product, in less than 5 minutes:
I will try to see if there are other cases.
The text was updated successfully, but these errors were encountered: