Defect #37530

Generating a thumbnail may take a long time and cause Redmine to hang

Added by Go MAEDA 2 months ago. Updated about 13 hours ago.

Status:NewStart date:
Priority:NormalDue date:
Assignee:-% Done:


Target version:Candidate for next major release
Resolution: Affected version:


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.

convert-timeout.patch Magnifier (1.33 KB) Go MAEDA, 2022-07-29 11:27


#1 Updated by Marius BALTEANU about 13 hours ago

  • Target version set to Candidate for next major release

I think we should log the timeouts and make the timeout configurable.

Also available in: Atom PDF