Closed Bug 1786827 Opened 3 years ago Closed 3 years ago

highlighting can take so long it kills gunicorn worker

Categories

(Socorro :: Webapp, defect, P2)

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: willkg, Assigned: willkg)

Details

Attachments

(1 file)

The report view on Crash Stats shows a stack and for each frame, it links to a syntax highlighted version of the source file with the specified line indicated.

For long source files, the highlighting step (uses pygments) takes so long, gunicorn kills the worker and the user gets back a 502 bad gateway.

Example crash report:

https://crash-stats.mozilla.org/report/index/1c85d9c5-60d3-4591-89ac-8e9810220824

In Sentry: https://sentry.prod.mozaws.net/operations/socorro-new-prod/issues/19528510/

Maybe there are other faster highlighting systems than pygments? Maybe there are options we can adjust that reduce the work it does? Maybe we can point to another system at Mozilla instead for viewing the source code? Maybe if the file size is past some number, we don't do highlighting and instead adjust the HTML to indicate the specified line?

I've seen a few of these and I'm fiddling with the view code now, so I'm going to grab this to look into.

Assignee: nobody → willkg
Status: NEW → ASSIGNED
Priority: -- → P2

This was deployed in bug #1799933. Marking as FIXED.

Status: ASSIGNED → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: