Skip to first unread message

Alison Diamond

unread,
May 26, 2021, 1:09:10 PM5/26/21
to AtoM Users
Hi, 
When I try to add a 'child' to a 'file' or 'part', I'm getting a 500-error message...
Can anyone advise?
Many thanks
Alison

Dan Gillean

unread,
May 26, 2021, 1:32:37 PM5/26/21
to ICA-AtoM Users

Hi Alison,


Any time you encounter a 500 error, the first thing we recommend is to check the webserver logs for more information on the nature of the error. 


If you have followed our recommended installation instructions, you can check the most recent error log entries with: 

Feel free to share any related error message you find here if you're not sure how to proceed, and we will try to offer suggestions on next steps. However, I strongly suspect that the issue is that the job scheduler just needs a restart.


There are several tasks in AtoM that can take a long time to execute - longer than the default 1 minute timeout limit that most browsers impose to prevent requests from exhausting all system resources. To avoid the browser timeouts from terminating long-running processes midway through (and potentially causing data corruption), AtoM uses Gearman as a job scheduler to perform these tasks asynchronously in the background. This way, the user can keep using AtoM while the job runs, and the length of the job is not bound to 1 minute or less. 


Examples of things that AtoM currently uses the job scheduler for: 

  • Imports (both CSV and XML) from the user interface

  • Exports from the clipboard

  • Moving a description from one parent to another

  • Generating finding aids and reports

  • Handling DIP uploads from Archivematica

And more - including the fact that in some cases, the job scheduler will handle an update the search index when new descendant records are added to an archival hierarchy.


The details for installing the job scheduler (Gearman) can be found here: 

If you have already installed and configured Gearman, then it's possible that the job scheduler simply needs a restart. You will know this is the case if you look in the error logs and see a message like, "No Gearman worker available that can handle the job."


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. 

If none of these suggestions help to resolve the issue, and/or this is not what you find in the error logs, then please let us know what you discover, as well as more information about your installation (Operating system, PHP version, etc)  and we can provide further suggestions. 


If it's not the job scheduler, there are also a a few other common maintenance tasks you could try running that often resolve issues. All of the following commands should be run from the root AtoM installation directory - if you have followed our recommended installation instructions, then this is typically: 

  • /usr/share/nginx/atom

If the commands won't run and you've confirmed you are in the right directory, try running them as the www-data user - this is the user to whom we assign all filesystem rights when installing and configuring AtoM. To do so, simply precede the commands below with sudo -u www-data


Rebuild the nested set: 

Generate slugs

Clear the application cache

Restart PHP-FPM

Also, if you have memcached installed, it is good to clear that cache as well. This command should not have any ill effects if you don't have memcached installed, so you can always try it out: 

Repopulate the search index

  • Useful for ensuring that the search index is up to date, and that there aren't records in the database that don't show up in search or browse pages.

  • Note: of all these common maintenance tasks, this is the only one that can take a long time to run (depending on how many records you have), and WILL temporarily remove content from your user interface as the index is rebuilt, so this one is best run outside of business hours if possible. However, as a sort of measure, reindexing the data in our public demo site usually only takes a couple minutes.

  • php symfony search:populate

  • See: https://www.accesstomemory.org/docs/latest/admin-manual/maintenance/populate-search-index/

  • Note: If you have a lot of records, this task can take a long time to run, and will make records temporarily unavailable in the user interface as they are reindexed. Best to run this after business hours. However, you can also use some of the task options to reduce the time it takes by limiting how it runs - for example, using the --update option will not make existing records unavailable as the task progresses (it will progressively replace the index rather than deleting it first). The --exclude-types option can be used to target just certain entity types, rather than all of them, and the --slug option can be used just to target specific records, taking the slug as input. See the documentation for further details and options. 

Let us know how it goes!


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/e3bc2cd2-dd8e-45ec-8e1d-903ee40f19f4n%40googlegroups.com.

Alison Diamond

unread,
May 26, 2021, 1:39:20 PM5/26/21
to ica-ato...@googlegroups.com
Hi Dan
The site is hosted  by Artefactual so I’m hoping the installation/upgrade  was all completed. But I’ll work through your suggestions (as far as I can!)  tomorrow.
Many thanks
Alison

Apologies for brevity, this message has been sent from my iPhone and my one fingered typing is slow and often inaccurate.

On 26 May 2021, at 18:32, Dan Gillean <d...@artefactual.com> wrote:



Dan Gillean

unread,
May 26, 2021, 4:55:23 PM5/26/21
to ICA-AtoM Users
Hi Alison, 

As a hosted client, you can always report these issues to our support email address! I will forward this thread to them, and someone can follow up with you to help resolve the issue. 

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

Ruaraidh Wishart

unread,
May 28, 2021, 10:01:40 AM5/28/21
to AtoM Users
Hi

I am using a locally hosted version of AtoM (v2.6) on Windows and am encountering this same problem, but not just with adding children - it can just be making changes to any field on a catalogue entry. 

My contact in IT has tried all of the fixes you've listed here, but they don't work. He's not getting any error reporting on the server, which is making it very difficult to find the cause. 

I'm repeatedly having to ask him to restart the server in order to get it working properly, only to have the same problem come up again a few hours later.

Is there anything else you can recommend trying?

Ruaraidh Wishart

Dan Gillean

unread,
May 31, 2021, 10:01:07 AM5/31/21
to ICA-AtoM Users
Hi Ruaraidh, 

If your installation is on Windows then there may be a limit to how much support we can offer. We do all of our testing and development with Ubuntu LTS O/S versions, and when installing on Windows, we strongly recommend that users consider virtualization, so an Ubuntu VM can be created and all recommended installation instructions followed within the VM without changes. If you've made local changes and installed on a Windows server directly, it's hard to say if there might be packages missing or different versions of dependencies adding to the issues. That said, I'll try to offer a few general suggestions. 

If you're not using Nginx as your webserver, you may need to look in a different location to find the webserver error logs. It will depend on how you've installed, but for most Linux users installing Apache, these would be found with the following command: 
  • sudo tail -f /var/log/apache2/error.log
Hopefully this might help your IT contact verify that you're looking in the right place for relevant webserver error log messages. 

It can be helpful to also double-check the filesystem permissions. I'm not sure what exactly to advise you with your installation, but in a typical Ubuntu installation, you want the www-data user to be the owner of all files and directories below the root installation directory. When following our recommended installation instructions, these can be set with: 
  • sudo chown -R www-data:www-data /usr/share/nginx/atom
This may be different in your installation however - your IT contact will need to do some investigation. 

Another thing you can try if nothing is showing up in the webserver error logs would be to try using Debug mode to see if it can provide further information. This may require changing a few configuration files to allow access. For more information, see: 
It's also good to make sure that the database schema matches the version of AtoM - this is especially important if you've upgraded from a previous version. Occasionally users will accidentally skip steps, and the database schema will be behind, which can lead to strange errors. When you look at the full version number in Admin > Settings, there will be 2 numbers - the release version, and the database schema version. We typically only include database schema changes in major releases, so all 2.6.x releases should have a schema version of v184. If you're running release 2.6.4 for example, then in Admin > Settings > Global at the top of the page the release version should be: 
  • 2.6.4 - v184
If it's not, and this is an upgraded installation, then you might want to consider repeating some of the upgrade steps. That is, make a backup of your data, purge the database, drop and recreate it, load your backup, run the upgrade task, then restart services. See: 
Hopefully some of these tips will help with your troubleshooting - good luck! 


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