Not able to show more than 49 users

Created on 18 June 2024, 4 months ago
Updated 12 August 2024, 2 months ago

Path : admin/people

Drupal\Core\Database\DatabaseExceptionWrapper: SQLSTATE[42000]: Syntax error or access violation: 1104

Installed Drupal version : 10.0.7
PHP version : 8.1.29
SQL : MariaDB 10.6.18

Adding users (path admin/people/create) works well until I reach the 50th user. When trying to show the list of (50) users (path admin/people) an error appears on a blank screen. Removing the last added user in the database enables to view the 49 users again.

<!--break-->

The logged error is :

Drupal\Core\Database\DatabaseExceptionWrapper: SQLSTATE[42000]: Syntax error or access violation: 1104 The SELECT would examine more than MAX_JOIN_SIZE rows; check your WHERE and use SET SQL_BIG_SELECTS=1 or SET MAX_JOIN_SIZE=# if the SELECT is okay: SELECT "u"."entity_id" AS "uid", "u"."roles_target_id" AS "rid" FROM "_SYNuser__roles" "u" WHERE "u"."entity_id" IN ( :uids__0, :uids__1, :uids__2, :uids__3, :uids__4, :uids__5, :uids__6, :uids__7, :uids__8, :uids__9, :uids__10, :uids__11, :uids__12, :uids__13, :uids__14, :uids__15, :uids__16, :uids__17, :uids__18, :uids__19, :uids__20, :uids__21, :uids__22, :uids__23, :uids__24, :uids__25, :uids__26, :uids__27, :uids__28, :uids__29, :uids__30, :uids__31, :uids__32, :uids__33, :uids__34, :uids__35, :uids__36, :uids__37, :uids__38, :uids__39, :uids__40, :uids__41, :uids__42, :uids__43, :uids__44, :uids__45, :uids__46, :uids__47, :uids__48, :uids__49 ) AND "u"."roles_target_id" IN ( :rids__0, :rids__1, :rids__2, :rids__3, :rids__4, :rids__5, :rids__6 ); Array ( [:uids__0] => 104 [:uids__1] => 103 [:uids__2] => 99 [:uids__3] => 98 [:uids__4] => 97 [:uids__5] => 96 [:uids__6] => 95 [:uids__7] => 94 [:uids__8] => 93 [:uids__9] => 92 [:uids__10] => 91 [:uids__11] => 90 [:uids__12] => 89 [:uids__13] => 88 [:uids__14] => 87 [:uids__15] => 86 [:uids__16] => 85 [:uids__17] => 84 [:uids__18] => 83 [:uids__19] => 82 [:uids__20] => 81 [:uids__21] => 80 [:uids__22] => 79 [:uids__23] => 78 [:uids__24] => 77 [:uids__25] => 76 [:uids__26] => 75 [:uids__27] => 74 [:uids__28] => 73 [:uids__29] => 72 [:uids__30] => 71 [:uids__31] => 70 [:uids__32] => 69 [:uids__33] => 68 [:uids__34] => 67 [:uids__35] => 66 [:uids__36] => 65 [:uids__37] => 64 [:uids__38] => 63 [:uids__39] => 62 [:uids__40] => 61 [:uids__41] => 60 [:uids__42] => 59 [:uids__43] => 58 [:uids__44] => 57 [:uids__45] => 56 [:uids__46] => 55 [:uids__47] => 4 [:uids__48] => 3 [:uids__49] => 2 [:rids__0] => anonymous [:rids__1] => authenticated [:rids__2] => content_editor [:rids__3] => administrator [:rids__4] => huurder [:rids__5] => gast [:rids__6] => eigenaar ) in Drupal\user\Plugin\views\field\Roles->preRender() (line 77 of /customers/9/8/9/vmeastrid.be/httpd.www/syn/core/modules/user/src/Plugin/views/field/Roles.php).

Is this a problem to be solved by the host provider or do I need to add SET SQL_BIG_SELECTS=1 or SET MAX_JOIN_SIZE=# ?

πŸ’¬ Support request
Status

Postponed: needs info

Version

11.0 πŸ”₯

Component
User moduleΒ  β†’

Last updated 3 days ago

Created by

πŸ‡§πŸ‡ͺBelgium iCU

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • Tried to reproduce the same issue in Local Drupal 10. There is no issue for me. Refer below screenshot.

  • πŸ‡ΊπŸ‡ΈUnited States mradcliffe USA

    Hi @iCU, @java008, the drupal.org community section project is a project specifically for the Community section on drupal.org, and not for general support for Drupal core. I am moving this into the core project as a support request. note that Drupal 10.0.0 is out-of-date and you should update to the latest Drupal 10 minor release for security reasons.

    I am removing the Novice tag from this issue because this is a support request and the Novice tag is used by Drupal core mentors to tag issues that have a clear task and resolution.

    I’m using this documentation as a source: https://www.drupal.org/community/contributor-guide/task/triage-novice-is... β†’

  • Have you modified the default view?

  • Status changed to Postponed: needs info 3 months ago
  • πŸ‡¨πŸ‡ΏCzech Republic petrsocha

    Adjusting the settings.php fixes the issue:

    $databases['default']['default'] = array (
    ...
    'init_commands' => [
    'big_selects' => 'SET SQL_BIG_SELECTS=1',
    ],
    'pdo' => [
    PDO::ATTR_TIMEOUT => 5,
    ],
    );

    But since 50 users isn't really a big select, I suppose the database query is not very well formed.

Production build 0.71.5 2024