Since I've a somewhat bigger field export, it happens that the field-rebuild runs into a timeout on installation.
The default of Drupal is 240. The attached patch changes the function field_features_export_render and adds a line with drupal_set_time_limit(3600); to the export output.
That should work for now, but if other rebuild functions, besides fields, also run into timeouts we should think about to increase the time limit somewhere more central in features.

Files: 
CommentFileSizeAuthor
#5 1053608-features_rebuild-4.patch651 byteshefox
Test request sent.
[ View ]
#4 features-rebuild-time-limit-1053608-4.patch426 bytesnedjo
Test request sent.
[ View ]
features-increase-time-limit-on-fields-import.patch509 bytesdas-peter
Test request sent.
[ View ]

Comments

Status:Needs review» Postponed (maintainer needs more info)

I am worried about brute-force increase of time limit. I think we should be using batch api if this operation typically takes this much time.

Status:Postponed (maintainer needs more info)» Closed (won't fix)

Closing this for lack of activity. Please re-open this issue if you can reproduce it in the latest version.

Title:Increase time limit for field rebuildIncrease time limit for features rebuild

A batch-based solution is here, #1572578: Rethink the way features are enabled / disabled, and likely is the best solution here. However, meantime, feature rebuilding is a common source of out of memory errors, especially at site install time if many features have been enabled, leading to all components of all enabled features being rebuilt in a single page load at first cache clear.

The standard Drupal core approach here is indeed to set the time limit, with 240 being the standard value used.

Status:Closed (won't fix)» Needs review
StatusFileSize
new426 bytes
Test request sent.
[ View ]

Patch adding a drupal_set_time_limit() call to features_rebuild(). This is parallel to what's done in e.g. _locale_import_po().

StatusFileSize
new651 bytes
Test request sent.
[ View ]

I'm not a fan of randomly setting a new time limit, or changing it unless really needed, so here's a version with a variable that can be set via $conf in settings.php or such

Status:Needs review» Fixed

I like the approach in #5. Might need another issue to add this to the documentation. Code committed to 09fc928.

Status:Fixed» Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.