Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Welcome to the CollectiveAccess support forum! Here the developers and community answer questions related to use of the software. Please include the following information in every new issue posted here:

  1. Version of the software that is used, along with browser and version

  2. If the issue pertains to Providence, Pawtucket or both

  3. What steps you’ve taken to try to resolve the issue

  4. Screenshots demonstrating the issue

  5. The relevant sections of your installation profile or configuration including the codes and settings defined for your local elements.

If your question pertains to data import or export, please also include:

  1. Data sample

  2. Your mapping

Answers may be delayed for posts that do not include sufficient information.

Export profile

edited August 2019 in Troubleshooting

I am having an issue with a cron script that I wrote to back-up my CA installation and which runs every midnight. Most of it is just a bash script, but I do call on caUtil once:

${CAbin}caUtils export-profile>${opath}CollectiveAccess/OTM-profile.xml

I do this because the documentation suggests that this is how to save a profile and I want to do exactly that as I am still making small changes to the profile of my set-up. For a while now, however, cron has been giving me an error message claiming that PHP has run out of its allocated 90 MB. This is very odd as I do not seem to have any memory issues when I use CollectiveAccess (aside from the ones I have brought up on this forum). Is exporting a profile just a very memory-intensive operation or might something else be going on? Also, instead of using caUtil, couldn't I just copy my current profile.xsd? I am assuming that that is where the profile information is stored, but the fact that there is a caUtil script suggests otherwise. I used to be able to run my cron script without any error message and I am not sure what exactly might have changed. It took me a while to notice that the messages were even there as they were being sent to spam. It is possible that the problem has something to do with upgrading to the latest version of CA. Please advise!


  • PHP memory management is pretty much opaque, so it's entirely possible that we're using more than 90 megs for a bit when constructing the XML tree. Try upping the memory limit in php.ini to 128m or 256m and see what happens. It's just a limit, not an actual allocation.

    The profile that is exported is based upon the current state of the database and will include any modifications made via the web user interface (Eg. modifying user interfaces, adding metadata elements). The original profile on disk is just the template you used to install. It won't have any additional modifications. If you don't care about capturing changes made outside of the original profile don't bother exporting.

  • I see. I do not make too many changes, so I could just skip the daily backup and create a new profile every now and then. I am just afraid I am going to forget. I will play around with upping the memory limit too. Thanks

  • Upping memory_limit was the solution. Actually making this happen was the biggest problem. Just setting memory_limit=128M in the phprc for the cli version of php that I set through .bash_profile (7.2) did not work. According to the error message my memory limit was still 90M. Turns out that cron does not import shell variables, so my cron job was using my provider's default cli version (7.0). Since my setup has distinct locations for the phprc file for each of the php versions 7.0 through 7.3, that meant that cron was also reading a different phprc file. Sourcing .bash_profile at the beginning of my cron script fixed that (in case anyone wants to know).

Sign In or Register to comment.