Dreamhost killing convert process

Hi everyone. I am running Omeka on a shared hosting plan with Dreamhost. When I try to add images (either via upload or Dropbox plugin), the derivative images process hits my resource limit and the process is killed.

Versions:

  • Linux dasher 3.2.61
  • Omeka 2.5
  • PHP 5.6
  • ImageMagick 6.6.9-7

To reproduce:

  1. Edit an Item
  2. Click the Files tab
  3. Click “Browse” button and select a file to upload (or select an image from the Dropbox list)
  4. Click “Save Changes” and wait…

Results:

  • The original file is stored in /files/original but none of the derivatives are created

This is the error displayed in the browser window:

Omeka has encountered an error
Zend_Controller_Dispatcher_Exception
    Invalid controller specified (admin)

exception 'Zend_Controller_Dispatcher_Exception' with message 'Invalid controller specified (admin)' in /home/USERNAME/DOMAIN/application/libraries/Zend/Controller/Dispatcher/Standard.php:248
Stack trace:
#0 /home/USERNAME/DOMAIN/application/libraries/Zend/Controller/Front.php(954): Zend_Controller_Dispatcher_Standard->dispatch(Object(Zend_Controller_Request_Http), Object(Zend_Controller_Response_Http))
#1 /home/USERNAME/DOMAIN/application/libraries/Zend/Application/Bootstrap/Bootstrap.php(105): Zend_Controller_Front->dispatch()
#2 /home/USERNAME/DOMAIN/application/libraries/Zend/Application.php(384): Zend_Application_Bootstrap_Bootstrap->run()
#3 /home/USERNAME/DOMAIN/application/libraries/Omeka/Application.php(77): Zend_Application->run()
#4 /home/USERNAME/DOMAIN/index.php(23): Omeka_Application->run()
#5 {main}

Error in my Omeka logs:

ImageMagick failed with status code 9.

Error in my PHP logs:

PHP Warning:  exif_read_data(6661d4267931b9ce28cfbc7be13d4dec.JPG): IFD data bad offset: 0xFFFFFC72 length 0x1EB0 in /home/USERNAME/DOMAIN/archive/application/libraries/getid3/module.graphic.jpg.php on line 71

(This PHP warning refers to the a bug related to EXIF extraction that affects the getID3 library (https://bugs.php.net/bug.php?id=72819). However, I don’t think this bug is the cause of my problem because I get the same behavior whether I use external ImageMagick or Imagick.)

As an experiment, if I run the following from the shell:

convert image.JPG -resize 800 fullsize.jpg & convert image.JPG -resize 200 thumbnail.jpg & convert image.JPG -resize 200x200^ -gravity center -crop 200x200+0+0 +repage square.jpg

Then I get the following error to stderr:

Yikes! One of your processes (convert, pid 7028) was just killed for excessive resource usage. Please contact DreamHost Support for details.

I have similar results changing to the Imagick strategy in config.ini.

Has anyone else encountered this problem? Should I try passing memory limits to ImageMagick as commandline arguments?

1 Like

Quick update. Dreamhost support was not helpful (the obvious solution is to move from shared hosting to a virtual private server). However, I have a workaround that meets my requirements. Here are the steps (with references):

  1. Compiled my own ImageMagick binary and stored it in $HOME/local/bin.
  1. Set resource limits by editing the policy.xml associated with my local ImageMagick installation.
  1. Scaled down all of my images to my “fullsize” dimensions before uploading them to the server via the Dropbox plugin. (In this case, it is not important for visitors to access the original hi-res images.)

I hope this is helpful to others.

1 Like