Error 500 when exporting data content

239 views
Skip to first unread message

Nabil el filali

unread,
Apr 18, 2022, 11:46:20 PM4/18/22
to AtoM Users
Hello 
in the objective of handling a migration , i'm trying to export all data , but the operation fails with Error 500 

Help please


Dan Gillean

unread,
Apr 19, 2022, 9:28:54 AM4/19/22
to ICA-AtoM Users
Hi Nabil, 

Any time you encounter a 500 error, the first thing we recommend is to check the webserver error logs. 

Our documentation focuses on using Nginx as your webserver, so we don't test with Apache, but there is a suggested starting point for finding the webserver logs in Apache here: 
Please share any related error message you find there. 

Often, when 500 errors are experienced during exports performed from the clipboard, it's because the job scheduler requires a restart. AtoM uses Gearman as a job scheduler to handle long-running tasks that may time out in the web browser, including clipboard exports. Sometimes the atom-worker that Gearman manages dies, and requires a restart - you will know this is the case if the message in the webserver error logs says something like "No Gearman worker available that can handle the job."

If that is what you see, then you should try to restart the atom-worker, and then try again. To restart the atom-worker, see:
Some notes on this:
  • You can check the status of the atom-worker at any time with: sudo systemctl status atom-worker.This is useful to make sure the restart was successful.
  •  When the worker dies, AtoM will attempt to automatically restart it - however, to prevent the system from being caught in an endless loop, we added a restart limit - 3 retries every 24 hours. You can reset this fail limit with the following command:
  • sudo systemctl reset-failed atom-worker
  • Then run the restart command again if the previous attempts didn't work.

Otherwise if this does not resolve the issue, then more information would be helpful. Can you tell us more about what exactly you're trying to do? 

For example, are you trying to migrate content from one AtoM installation to another? If so, we recommend following the same process described in the Upgrading documentation, to migrate the whole database and uploads, rather than exporting everything and then attempting to re-import it. See:
If you are trying to move from AtoM to a different system, what type of export are you attempting - CSV export, or XML export (and if XML, what type? E.g. EAD, MODS, or DC XML)? Are you running this export from the user interface, or via the command-line?

As per my response to your other post, please also tell us more about your installation environment. Hopefully with any messages you find in the webserver error logs and more information about what you were attempting to do and the steps you were following to do it, we can provide further suggestions. 

Cheers, 

Dan Gillean, MAS, MLIS
AtoM Program Manager
Artefactual Systems, Inc.
604-527-2056
@accesstomemory
he / him


--
You received this message because you are subscribed to the Google Groups "AtoM Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ica-atom-user...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ica-atom-users/2c6ae939-5f1d-44ad-927f-acc8046eec1en%40googlegroups.com.

Nabil el filali

unread,
Apr 20, 2022, 8:42:58 PM4/20/22
to AtoM Users
Hi Dan
First,  thank you for your answer, please find there additional information regarding the issue encountered:

- To export, i'm using the user interface, can you please tell me how to do it via the command-line? (version AtoM 2.0)
- target format is XML EAD

in apache2 log, I found out the error below:

[warn] mod_fcgid: read data timeout in 360 seconds
Premature end of script headers: php-cgi, referer: [snip]


Can you please help me to find where can I track the 360 seconds setting ?
If command line would help as a workaround ? for information, I'm using AtoM 2.0 version

Nabil el filali

unread,
Apr 21, 2022, 7:05:43 AM4/21/22
to AtoM Users
for information, PHP version is PHP5

Dan Gillean

unread,
Apr 21, 2022, 9:36:31 AM4/21/22
to ICA-AtoM Users
Hi Nabil, 

It looks like the 2.0 documentation did not yet have instructions for command-line XML export. However, it should work the same as in the 2.1 documentation:  
I'm not sure exactly where that read data timeout is configured, but a number of execution limits are configured in the PHP block created during installation: 
They may also be configured in your local php.ini file. We have some explanations of some of the execution limits in later versions of the documentation, for reference: 
Keep in mind that your web browser typically has its own timeout limit, which usually defaults to about 1 minute. Because the EAD XML export via the user interface is performed synchronously (as in, on demand in real time via the web browser), large XML exports may time out before being delivered. In later versions of AtoM we handle exports via the clipboard using the job scheduler to avoid this issue. The job scheduler can handle long-running tasks asynchronously in the background, so you are not waiting for the web browser to complete the request. 

I strongly recommend that you consider upgrading if at all possible - there are many other improvements, performance enhancements, new features, security patches, and bug fixes in later versions. 

Otherwise, I hope this helps!

Regards, 

Dan Gillean, MAS, MLIS
AtoM Program Manager
Artefactual Systems, Inc.
604-527-2056
@accesstomemory
he / him

Reply all
Reply to author
Forward
0 new messages