contentful_middleman icon indicating copy to clipboard operation
contentful_middleman copied to clipboard

Processing hangs after updating the gem

Open brtdwchtr opened this issue 5 years ago • 3 comments

In one of our projects I updated the contentful_middleman gem to use the latest version, coming from the "dl/upgrade-to-v4" branch.

After this update, running the middleman contentful command with anything higher than "max_include_resolution_depth: 1" in the config causes processing to hang after a few seconds.

I've tried playing with the all_entries_page_size, but that doesn't seem to help.

brtdwchtr avatar Jul 18 '19 14:07 brtdwchtr

Hey @brtdwchtr,

This may be related to how your content model is done, it looks like you have multiple circular relationships.

Something that may make it go much faster is by enabling reuse_entries: true in the client options. This should make the SDK not re-create already hydrated entries.

Hope this helps,

Cheers

dlitvakb avatar Jul 18 '19 15:07 dlitvakb

thanks for the quick reply @dlitvakb

Thing is, I had issues with circular relationships before, but limiting the max depth to 2 and setting reuse_entries to true fixed it at the time and haven't had any problems since.

do you think any specific change in the latest releases has increased the vulnerability towards probs with circular relationships? This can't just be a performance problem, right?

brtdwchtr avatar Jul 18 '19 15:07 brtdwchtr

Hey @brtdwchtr ,

This hasn't been changed in almost a year, so I don't really know what may be going on, have you considered setting the gem to use the latest release instead of the one in the branch?

Using 'contentful_middleman', '~> 4.0' should do the trick.

Cheers

dlitvakb avatar Jul 18 '19 17:07 dlitvakb