Closed
Bug 1486354
Opened 8 years ago
Closed 6 years ago
download_counts_from_file.py takes unusual long time to finish
Categories
(Cloud Services :: Operations: AMO, task)
Cloud Services
Operations: AMO
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: wezhou, Assigned: wezhou)
Details
[1] runs daily by a cron. However, sometimes [1] takes unusual long time to finish. This affects a few downstream cron jobs [2] because if [1] can't finish in time, they do not have the correct data to work on.
As an example, on 8/26/2018, [1] took more than 3 hours to finish, processed about 433K lines. Logs show:
> "Timestamp": "2018-08-26T11:57:34",
> "Fields": { "msg": "Processed a total of 433148 lines" },
> "Timestamp": "2018-08-26T11:57:34",
> "Fields": { "msg": "Total processing time: 3:27:28.982780" },
However, for comparison, on 8/24/2018, it only took 1 minute 26 seconds to process ~321K lines.
> "Timestamp": "2018-08-24T08:31:33",
> "Fields": { "msg": "Processed a total of 321418 lines" },
> "Timestamp": "2018-08-24T08:31:33",
> "Fields": { "msg": "Total processing time: 0:01:26.969540" },
We should probably understand why there is a big difference of processing time compared to the small difference of number of processed lines.
[1] https://github.com/mozilla/addons-server/blob/master/src/olympia/stats/management/commands/download_counts_from_file.py
[2] https://github.com/mozilla/addons-server/blob/master/scripts/crontab/crontab.tpl#L36-L40
Happened again for 2018-10-21,
> {"EnvVersion": "2.0", "Type": "adi.downloadcounts", "Severity": 6, "Fields": {"msg": "Processed a total of 257096 lines", "remoteAddressChain": "", "uid": "<anon>"}, "Timestamp": 1540208096812822016, "Logger": "http_app_addons", "Hostname": "ip-172-31-42-86", "Pid": 1}
> {"EnvVersion": "2.0", "Type": "adi.downloadcounts", "Severity": 7, "Fields": {"msg": "Total processing time: 3:04:51.589503", "remoteAddressChain": "", "uid": "<anon>"}, "Timestamp": 1540208096813018112, "Logger": "http_app_addons", "Hostname": "ip-172-31-42-86", "Pid": 1}
The processing time for this day and other days can be replicated at different days and times. As such, the extended process time is probably not due to instance load but more likely have something to do with the data of the day or the algorithm of the script.
This is resolved in https://github.com/mozilla/addons-server/issues/14287.
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•