Page MenuHomePhabricator

Investigate revscoring-editquality-damaging alert triggered by MW API fetch errors
Open, Needs TriagePublic

Description

An alert for the hewiki-damaging-predictor service was triggered on 27/08/2025. The initial alert information was:

hewiki-damaging-predictor-default revscoring-editquality-damaging istio-system k8s-mlserve critical eqiad prometheus

I looked at the hewiki-damaging-predictor logs in logstash: https://logstash.wikimedia.org/goto/b07d169d43c454bc99fcdbf3bf68a01f and there were spikes between 13:00 and 13:30 UTC. They showed that the service was failing due to:

ERROR:root:An error has occurred while fetching feature values from the MW API

see logs here: https://phabricator.wikimedia.org/P81904

This alert resolved itself at ~13:25 UTC but we are going to investigate the root cause of the issue.

Event Timeline

One thing that stands out from the logs is that there are multiple concurrent requests hitting the same revisions. For example, there are 107 requests from the same rev_id: 41731385. Each of these requests fetching from MW API. A caching mechanism would be a great solution for this issue to reduce redundant API calls and lower the risk of timeouts under load.

One thing that stands out from the logs is that there are multiple concurrent requests hitting the same revisions. For example, there are 107 requests from the same rev_id: 41731385. Each of these requests fetching from MW API. A caching mechanism would be a great solution for this issue to reduce redundant API calls and lower the risk of timeouts under load.

Hey @kevinbazira thnx for reporting this issue.
If I understand correctly you suggest to implement a caching logic when we are hitting the MWAPI from lifting right ?
So, the caching logic will be over the get_extractor() ?
Or you meant something different ?

One thing that stands out from the logs is that there are multiple concurrent requests hitting the same revisions. For example, there are 107 requests from the same rev_id: 41731385. Each of these requests fetching from MW API. A caching mechanism would be a great solution for this issue to reduce redundant API calls and lower the risk of timeouts under load.

Hey @kevinbazira thnx for reporting this issue.
If I understand correctly you suggest to implement a caching logic when we are hitting the MWAPI from lifting right ?
So, the caching logic will be over the get_extractor() ?
Or you meant something different ?

@gkyziridis thank you for looking into this. The caching idea is to avoid redundant preprocessing: if a rev_id already has a cached prediction (with the same model version), we would return this prediction directly without re-fetching features from MW API. Since the errors are intermittent and revscoring model-servers are planned for decommissioning, it is probably best to discuss with the ML team before prioritizing this change.