[Archivesspace_Users_Group] Large PDF export failing
Chris Fitzpatrick
Chris.Fitzpatrick at lyrasis.org
Wed Dec 3 10:39:46 EST 2014
Hi Patrick,
What's most likely happening is that you're just hitting a webserver timeout error. The problem is that large resources can take a long time to generate EAD XML, and it'll be even longer to take that XML, transform it into HTML, and transform that HTML into a PDF.
You could bump up the timeout time to a crazy high number, which could fix the problem.
The ultimate fix is going to have to be to background EAD exports to jobs, like they are for imports. We have this slated for a release shortly after the beginning of the new year.
I do have a utility here that might help out =>
https://github.com/archivesspace/ead2pdf/releases
You can take an EAD XML file and run it through the PDF creation process locally.
To run it, simply run the :
java -jar ead2pdf.jar ead_file.xml output_pdf.pdf
And it'll use the same XSLT that ASpace uses.
Hope this helps...
b,chris.
[https://avatars2.githubusercontent.com/u/1311559?v=3&s=400]<https://github.com/archivesspace/ead2pdf/releases>
Releases · archivesspace/ead2pdf · GitHub
ead2pdf - ASpace EAD2PDF
Read more...<https://github.com/archivesspace/ead2pdf/releases>
Chris Fitzpatrick | Developer, ArchivesSpace
Skype: chrisfitzpat | Phone: 918.236.6048
http://archivesspace.org/
________________________________
From: archivesspace_users_group-bounces at lyralists.lyrasis.org <archivesspace_users_group-bounces at lyralists.lyrasis.org> on behalf of Galligan, Patrick <PGalligan at rockarch.org>
Sent: Tuesday, December 2, 2014 6:33 PM
To: Archivesspace Users Group
Subject: [Archivesspace_Users_Group] Large PDF export failing
We’ve been doing some testing with PDF exports recently, and have noticed that if a resource record gets to a certain size, it will lock up AS for a couple of minutes and send the user to an error page.
We have had no problem with smaller PDF files, and haven’t had issues with EAD export. Has anyone else run into this issue? Our IT department has been unable to track down the issue. We thought it might be a mysql lock wait problem, but that ended up being fruitless.
Any thoughts?
Here’s a log of what’s happening:
2014-12-02 12:21:16.741:INFO:/:Started GET "/resources/11211/download_ead?include_daos=false&include_unpublished=true&numbered_cs=false&print_pdf=true" for 192.168.50.129 at 2014-12-02 12:21:16 -0500|
2014-12-02 12:21:16.761:INFO:/: Parameters: {"include_daos"=>"false", "include_unpublished"=>"true", "numbered_cs"=>"false", "print_pdf"=>"true", "id"=>"11211"}|
D, [2014-12-02T12:21:16.946000 #25469] DEBUG -- : Thread-3486: GET /repositories/2/resource_descriptions/11211.pdf/metadata [session: #<Session:0x2574efb4 @store={:user=>"jmorillo", :login_time=>2014-12-02 09:32:54 -0500, :expirable=>true}, @id="e8486be22af564ff33cd7254844716d921777beae4daeafadf29ac8c676a21e6">]
D, [2014-12-02T12:21:16.959000 #25469] DEBUG -- : Thread-3486: Post-processed params: {:id=>11211, :repo_id=>2, :fmt=>"pdf"}
D, [2014-12-02T12:21:17.049000 #25469] DEBUG -- : Thread-3470: GET /repositories/2/resource_descriptions/11211.pdf?include_unpublished=true&print_pdf=true&include_daos=false&numbered_cs=false [session: #<Session:0x5e315b17 @store={:user=>"jmorillo", :login_time=>2014-12-02 09:32:54 -0500, :expirable=>true}, @id="e8486be22af564ff33cd7254844716d921777beae4daeafadf29ac8c676a21e6">]
D, [2014-12-02T12:21:17.057000 #25469] DEBUG -- : Thread-3470: Post-processed params: {:id=>11211, :include_unpublished=>true, :include_daos=>false, :numbered_cs=>false, :print_pdf=>true, :repo_id=>2}
D, [2014-12-02T12:21:20.720000 #25469] DEBUG -- : Thread-3470: GET /repositories/2/resources/11211/tree?include_unpublished=true&print_pdf=true&include_daos=false&numbered_cs=false [session: #<Session:0x21b962c3 @store={:user=>"jmorillo", :login_time=>2014-12-02 09:32:54 -0500, :expirable=>true}, @id="e8486be22af564ff33cd7254844716d921777beae4daeafadf29ac8c676a21e6">]
D, [2014-12-02T12:21:20.728000 #25469] DEBUG -- : Thread-3470: Post-processed params: {:id=>11211, :repo_id=>2}
D, [2014-12-02T12:21:31.415000 #25469] DEBUG -- : Thread-3470: Responded with [200, {"Content-Type"=>"application/json", "Cache-Control"=>"private, must-revalidate, max-age=0", "Content-Length"=>"3850900"}, ["{\"title\":\"Nelson A. Rockefeller papers\",\"id\":11211,\"node_type\":\"resource\",\"publish\":true,\"suppressed\":false,\"children\":[{\"title\":\"Activities, 1930-1979, bulk 1946-1971\",\"id\":658077,\"record_uri\":\"/repositories/2/archival_objects/658077\",\"publish\":true,\"suppressed\":false,\"node_type\":\"archival_object\",\"level\":\"series\",\"has_children\":true,\"chi... in 10529.0ms
Patrick Galligan
Rockefeller Archive Center
Assistant Digital Archivist
914-366-6386
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lyralists.lyrasis.org/pipermail/archivesspace_users_group/attachments/20141203/4f190374/attachment.html>
More information about the Archivesspace_Users_Group
mailing list