Unable to recreate feature in drupal 7

Unable to recreate feature in drupal 7

In my drupal developer environment i had a problem which made it impossible to recreate features. When clicking the recreate tab all i would see was a blank page.

First it’s hard to troubleshoot without an error message. So adding this code to index.php will display the error.

<?php
error_reporting(E_ALL);
ini_set('display_errors', TRUE);
ini_set('display_startup_errors', TRUE);

Now when reloading I could see the following error message:

Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 115619 bytes) in /var/www/drupal/public/includes/common.inc on line 5849

Memory leak

This probably is happening because of a memoryleak somewhere. But since this only occurs in my dev environment and at this point a quick fix is needed, so i decided to override the maximum amount of memory that scripts can use with this line in index.php:

ini_set(‘memory_limit’, ‘-1’);

So the index.php now looks like this:

<?php

error_reporting(E_ALL);
ini_set('display_errors', TRUE);
ini_set('display_startup_errors', TRUE);
ini_set('memory_limit', '-1');
/**
 * @file
 * The PHP page that serves all page requests on a Drupal installation.
 *
 * The routines here dispatch control to the appropriate handler, which then
 * prints the appropriate page.
 *
 * All Drupal code is released under the GNU General Public License.
 * See COPYRIGHT.txt and LICENSE.txt.
 */

/**
 * Root directory of Drupal installation.
 */
define('DRUPAL_ROOT', getcwd());

require_once DRUPAL_ROOT . '/includes/bootstrap.inc';
drupal_bootstrap(DRUPAL_BOOTSTRAP_FULL);
menu_execute_active_handler();

I would not recommend doing this on a production server though