Gitify vs LocationResources (probably)

I’m having an issue with gitify build where it maxes out of memory when building content (PHP Fatal error: Allowed memory size of 4294967296 bytes exhausted). I tried with all three ‘verbose’ settings and it didn’t give me a clean failure point, simply listing what individual content items went in and then spitting with the memory error.

When I dropped the contents of modx_site_content the build worked and it was either a class_key of Collection (for Collections) or Location (for LocationResource) next in the list. The rebuild also worked if I added the -f ‘force’ option.

I ensured that both Collections tables and LocationResources tables were in .gitify and ordered ahead of Content for what that was worth, but it doesn’t seem to have made a difference.

There’s nothing in the MODX error log, but not certain if Gitify usually touches that.

I thought I’d solved something like this before, but have been unable to find mention of it in the forums so figured I’d reach out here for help in hopes of solving and documenting it in one go.

Anyone had issues with Gitify and LocationResources or Collections? Any ideas what I could try next/should be looking out for?

That might mean that you have a circular reference – for example a snippet that grabs resources, including the one its called on, so it calls itself recursively until the memory runs out. Something in your process that would run .gitify would do it.

Does gitify run snippets as it inserts them? This is Modmore’s Gitify I’m talking about.

I thought it just used XPDO to create/update/delete the database table data - might be about to learn something big here.

Hey @josh_curtis,

I’ve not tested Gitify with LocationResources yet, but it may have to do with the object Location extending modResource whereas it’s LocationProfile that actually holds the data. :thinking:

The extended object is still in the resource table, it’s just a different class name.

CollectionContainer also extends modResource for Collections and I’ve had no issues with those so it would appear that’s not an immediate deal breaker unless there’s something odd going on further ‘down’ the line.

How have you got it listed in your .gitify file?

Something like this?:

location:
    primary: [resource, id]
    package: locationresources
location_profile:
    class: LocationProfile
    primary:
        - id
    package: locationresources