Actions
Feature #37530
closedAdd timeout for thumbnail generation process
Start date:
Due date:
% Done:
0%
Estimated time:
Resolution:
Fixed
Description
When Redmine::Thumbnail.generate
generates thumbnails, some input files can take a very long time to generate thumbnails, causing Redmine to hang.
Today, in my environment, Redmine tried to generate a thumbnail for a particular PDF file and it took almost an hour (3,521,455ms) and finally raised an error. Because there were multiple accesses to the issue with the PDF attached, all processes of Redmine were occupied with the generation of a thumbnail. As the result, all other requests were not accepted and users could not see any page of Redmine.
Creating thumbnail failed (`convert /*****/*****.pdf[0] -thumbnail 100x100> png:-` failed with error: convert-im6.q16: no images defined `png:-' @ error/convert.c/ConvertImageCommand/3229 ): Completed 404 Not Found in 3521455ms (ActiveRecord: 13.3ms | Allocations: 27136)
The attached patch sets the timeout of convert
command to 10 seconds to prevent similar problems from occurring.
Files
Actions