Page MenuHomePhabricator

HTTP 500 error trying to render an SVG file (2048x2048px; 2.9MB) to a large PNG thumbnail
Closed, DuplicatePublic

Description

https://commons.wikimedia.org/wiki/File:Operation_Lavender_2017.svg

Rendering to PNG doesn't work, for example this link https://upload.wikimedia.org/wikipedia/commons/thumb/6/6e/Operation_Lavender_2017.svg/2048px-Operation_Lavender_2017.svg.png generates error "Our servers are currently under maintenance or experiencing a technical problem."

Event Timeline

https://upload.wikimedia.org/wikipedia/commons/thumb/6/6e/Operation_Lavender_2017.svg/1200px-Operation_Lavender_2017.svg.png works fine :P

I guess it's somewhat of a Performance-Team issue as trying to render a fairly large (by file size) SVG into a high resolution image takes too long

Aklapper renamed this task from SVG file cannot be rendered to PNG to HTTP 500 error trying to render an SVG file (2048x2048px; 2.9MB) to a large PNG thumbnail.Oct 27 2018, 8:31 PM
Aklapper added a project: Thumbor.

The file contains extensive feGaussianBlur filter usage, in which is librSVG not good. This filter has also only support recently.

1024px version can't be rendered too, see

Безымянный.png (285×1 px, 68 KB)

As Perhelion noted, this is most likely timeouts from unoptimized Gaussian blur in librsvg. librsvg 2.48.4 processes the 2048px thumbnail in about 8 seconds, while librsvg 2.40.16 (current prod version) takes 98 seconds: well over the 1 minute timeout. The Gaussian blur optimizations were added in librsvg 2.43 and 2.44.0.