This is related to the latest committed code in
#2123315: Pager does not appear if fields use Views PHP (7.x-1.x)
and
#2614186: PHP fatal error

The views_php_views_post_build() is causing some views to consume huge memory. Increased to 1G memory_limit also not enough. Commented out the code solves the issue.

Example views having issue, node administration from admin_views with over 1M content. Even filter to content type with 300K content also having the same issue.

Errors:

FastCGI: server "/usr/lib/cgi-bin/php5-fcgi" stderr: PHP message: PHP Warning:  Unknown: Input variables exceeded 1000. To increase the limit change max_input_vars in php.ini. in Unknown on line 0, referer: http://drupalsite.local/admin/content
FastCGI: server "/usr/lib/cgi-bin/php5-fcgi" stderr: PHP message: PHP Fatal error:  Allowed memory size of 377487360 bytes exhausted (tried to allocate 48 bytes) in /var/drupal/sites/all/modules/contrib/views/plugins/views_plugin_query_default.inc on line 1491, referer: http://drupalsite.local/admin/content

Content of $view->build_info: http://pastebin.com/Gbbimq64

Comments

ckng created an issue. See original summary.

ckng’s picture

- deleted -

ckng’s picture

Title: PHP Warning + Fatal; Unknown: Input variables exceeded » Pager fix breaks admin_views
ckng’s picture

Encounter this again when a custom views is added under /admin/* path.

The views query limit is removed by views_php_views_post_build() causing rows to be loaded, which explain the overflow in the original issue with admin_views.

Here is $view->build_info['query'] dump

object(SelectQuery)[324]
  protected 'fields' => 
    array (size=4)
      'node_title' => 
        array (size=3)
          'field' => string 'title' (length=5)
          'table' => string 'node' (length=4)
          'alias' => string 'node_title' (length=10)
      'nid' => 
        array (size=3)
          'field' => string 'nid' (length=3)
          'table' => string 'node' (length=4)
          'alias' => string 'nid' (length=3)
      'node_status' => 
        array (size=3)
          'field' => string 'status' (length=6)
          'table' => string 'node' (length=4)
          'alias' => string 'node_status' (length=11)
      'node_changed' => 
        array (size=3)
          'field' => string 'changed' (length=7)
          'table' => string 'node' (length=4)
          'alias' => string 'node_changed' (length=12)
  protected 'expressions' => 
    array (size=0)
      empty
  protected 'tables' => 
    array (size=2)
      'node' => 
        array (size=5)
          'join type' => null
          'table' => string 'node' (length=4)
          'alias' => string 'node' (length=4)
          'condition' => null
          'arguments' => 
            array (size=0)
              ...
      'users_node' => 
        array (size=5)
          'join type' => string 'LEFT' (length=4)
          'table' => string 'users' (length=5)
          'alias' => string 'users_node' (length=10)
          'condition' => string 'node.uid = users_node.uid' (length=25)
          'arguments' => 
            array (size=0)
              ...
  protected 'order' => 
    array (size=1)
      'node_title' => string 'ASC' (length=3)
  protected 'group' => 
    array (size=0)
      empty
  protected 'where' => 
    object(DatabaseCondition)[173]
      protected 'conditions' => 
        array (size=2)
          '#conjunction' => string 'AND' (length=3)
          0 => 
            array (size=3)
              ...
      protected 'arguments' => 
        array (size=0)
          empty
      protected 'changed' => boolean true
      protected 'queryPlaceholderIdentifier' => null
  protected 'having' => 
    object(DatabaseCondition)[181]
      protected 'conditions' => 
        array (size=1)
          '#conjunction' => string 'AND' (length=3)
      protected 'arguments' => 
        array (size=0)
          empty
      protected 'changed' => boolean true
      protected 'queryPlaceholderIdentifier' => null
  protected 'distinct' => boolean false
  protected 'range' => 
    array (size=2)
      'start' => int 0
      'length' => int 50
  protected 'union' => 
    array (size=0)
      empty
  protected 'prepared' => boolean false
  protected 'forUpdate' => boolean false
  protected 'connection' => 
    object(DatabaseConnection_mysql)[2]
      protected 'needsCleanup' => boolean false
      protected 'target' => string 'default' (length=7)
      protected 'key' => string 'default' (length=7)
      protected 'logger' => null
      protected 'transactionLayers' => 
        array (size=0)
          empty
      protected 'driverClasses' => 
        array (size=2)
          'SelectQuery' => string 'SelectQuery' (length=11)
          'DatabaseSchema' => string 'DatabaseSchema_mysql' (length=20)
      protected 'statementClass' => string 'DatabaseStatementBase' (length=21)
      protected 'transactionSupport' => boolean true
      protected 'transactionalDDLSupport' => boolean false
      protected 'temporaryNameIndex' => int 0
      protected 'connectionOptions' => 
        array (size=7)
          'driver' => string 'mysql' (length=5)
          'database' => string '***' (length=9)
          'username' => string '***' (length=9)
          'password' => string '***' (length=10)
          'host' => string '***' (length=22)
          'port' => string '3306' (length=4)
          'prefix' => 
            array (size=1)
              ...
      protected 'schema' => 
        object(DatabaseSchema_mysql)[273]
          protected 'connection' => 
            &object(DatabaseConnection_mysql)[2]
          protected 'placeholder' => int 0
          protected 'defaultSchema' => string 'public' (length=6)
          protected 'uniqueIdentifier' => string '570f6a6d41e9a7.37194734' (length=23)
      protected 'prefixes' => 
        array (size=1)
          'default' => string '' (length=0)
      protected 'prefixSearch' => 
        array (size=2)
          0 => string '{' (length=1)
          1 => string '}' (length=1)
      protected 'prefixReplace' => 
        array (size=2)
          0 => string '' (length=0)
          1 => string '' (length=0)
  protected 'connectionTarget' => string 'default' (length=7)
  protected 'connectionKey' => string 'default' (length=7)
  protected 'queryOptions' => 
    array (size=1)
      'return' => int 1
  protected 'uniqueIdentifier' => string '570f6a6d49ea72.85539537' (length=23)
  protected 'nextPlaceholder' => int 0
  protected 'comments' => 
    array (size=0)
      empty
  public 'alterTags' => 
    array (size=3)
      'views' => int 1
      'views_administration_journal_book' => int 1
      'user_access' => int 1
  public 'alterMetaData' => 
    array (size=1)
      'views_substitutions' => 
        array (size=8)
          '***ADMINISTER_NODES***' => int 1
          '***VIEW_OWN_UNPUBLISHED_NODES***' => int 1
          '***BYPASS_NODE_ACCESS***' => int 1
          '***CURRENT_USER***' => int 1
          '***CURRENT_VERSION***' => string '7.41' (length=4)
          '***CURRENT_TIME***' => int 1460628077
          '***CURRENT_LANGUAGE***' => string 'en' (length=2)
          '***DEFAULT_LANGUAGE***' => string 'en' (length=2)
skylord’s picture

mustanggb’s picture

Status: Active » Closed (duplicate)