Bug #6549

QubitDigitalObject->downloadExternalObject has a very short timeout period

Added by Misty De Meo about 8 years ago. Updated almost 8 years ago.

Status:VerifiedStart date:04/02/2014
Priority:LowDue date:
Assignee:Misty De Meo% Done:

0%

Category:Digital object
Target version:Release 2.1.0
Google Code Legacy ID: Tested version:2.0.1, 2.1
Sponsored:No Requires documentation:

Description

QubitDigitalObject has an `downloadExternalObject` method to import external digital objects; however, it has a hardcoded 10-second timeout on the download itself. Since many digital objects being imported (for instance, PDF scans) can be a few megabytes in size and take more than 10 seconds to download, this ends up limiting the ability of AtoM to import these files.

Should we raise this, and/or make it configurable? Is there a reason it was set to 10 seconds?

app-yml-settings.png - An image of the app.yml file - notice the download_timeout setting (default is 10s) (88.6 KB) Dan Gillean, 08/14/2014 12:10 PM

History

#1 Updated by Dan Gillean almost 8 years ago

  • Status changed from New to QA/Review
  • Target version set to Release 2.1.0

Update: Misty had identified the problem with the timeouts being hardcoded to 10 seconds, here: https://github.com/artefactual/atom/blob/9963b7fc1954d6ccc5e944963a5ad01c6cfd00f4/lib/model/QubitDigitalObject.php#L1358

Misty has since submitted a pull request that will add a configuration parameter to the app.yml file for the downloadExternalObject timeout value. Pull request is here: https://github.com/artefactual/atom/pull/29

Mike Gale has merged this pull request into 2.x

Also copying Misty's notes (which were for a specific client use case, but are nonetheless helpful creating documentation of this feature):

To change this value, edit config/app.yml and set `download_timeout:` to something else. The default is 10; I suggest something absurdly high to ensure that download timeouts just don't happen. Say, 1000? You'll also need to `php symfony cc` after changing it, I believe.

When importing PDFs, you'll also need to adjust the amount of RAM PHP is set to use; probably best just to let it use unlimited RAM (e.g. via php -d memory_limit=-1).

#2 Updated by Dan Gillean almost 8 years ago

  • Status changed from QA/Review to Verified
  • Tested version 2.0.1, 2.1 added

Tested in qa/2.1.x

In the command line:

nano config/app.yml

This will open the app.yml file (see attached screenshot)

Alter the "download_timeout" value as desired

Ctrl+X to Exit; click Y to save your changes

It's recommended when changing settings that you restart php-fpm, and clear the cache:

sudo restart php5-fpm
php symfony cc

Digital object download timeout has now been successfully changed.

Also available in: Atom PDF