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.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

irakli’s picture

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.

mpotter’s picture

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.

nedjo’s picture

Title: Increase time limit for field rebuild » Increase 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.

nedjo’s picture

Status: Closed (won't fix) » Needs review
FileSize
426 bytes

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

hefox’s picture

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

mpotter’s picture

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.