Recently build site, ExpressionEngine 4.3.6. Everything was working fine until after creating a new entry I started seeing an exception caught error (shown below). Since it only occurred in conjunction with certain templates I tried pairing those templates down to bare essentials and found that the simplest tags produce the result, unless limit="1" is added:

This works:

{exp:channel:entries channel="bob" limit="1"}
<p>{title}</p>
{/exp:channel:entries}

This does not:

{exp:channel:entries channel="bob"}
<p>{title}</p>
{/exp:channel:entries}

The issue is isolated to only one channel (this explains why not all templates throw the error). Any ideas?

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 t.entry_id, t.channel_id, t.forum_topic_id, t.author_id, t.ip_address, t.title, t.url_title, t.status, t.view_count_one, t.view_count_two, t.view_count_three, t.view_count_four, t.allow_comments, t.comment_expiration_date, t.sticky, t.entry_date, t.year, t.month, t.day, t.edit_date, t.expiration_date, t.recent_comment_date, t.comment_total, t.site_id as entry_site_id, w.channel_title, w.channel_name, w.channel_url, w.comment_url, w.comment_moderate, w.channel_html_formatting, w.channel_allow_img_urls, w.channel_auto_link_urls, w.comment_system_enabled, m.username, m.email, m.screen_name, m.signature, m.sig_img_filename, m.sig_img_width, m.sig_img_height, m.avatar_filename, m.avatar_width, m.avatar_height, m.photo_filename, m.photo_width, m.photo_height, m.group_id, m.member_id, wd.*, exp_channel_data_field_4.field_id_4, exp_channel_data_field_4.field_ft_4, exp_channel_data_field_5.field_id_5, exp_channel_data_field_5.field_ft_5, exp_channel_data_field_6.field_id_6, exp_channel_data_field_6.field_ft_6, exp_channel_data_field_15.field_id_15, exp_channel_data_field_15.field_ft_15, exp_channel_data_field_16.field_id_16, exp_channel_data_field_16.field_ft_16, exp_channel_data_field_17.field_id_17, exp_channel_data_field_17.field_ft_17, exp_channel_data_field_19.field_id_19, exp_channel_data_field_19.field_ft_19, exp_channel_data_field_23.field_id_23, exp_channel_data_field_23.field_ft_23, exp_channel_data_field_25.field_id_25, exp_channel_data_field_25.field_ft_25, exp_channel_data_field_29.field_id_29, exp_channel_data_field_29.field_ft_29, exp_channel_data_field_30.field_id_30, exp_channel_data_field_30.field_ft_30, exp_channel_data_field_31.field_id_31, exp_channel_data_field_31.field_ft_31, exp_channel_data_field_32.field_id_32, exp_channel_data_field_32.field_ft_32, exp_channel_data_field_33.field_id_33, exp_channel_data_field_33.field_ft_33, exp_channel_data_field_34.field_id_34, exp_channel_data_field_34.field_ft_34, exp_channel_data_field_35.field_id_35, exp_channel_data_field_35.field_ft_35, exp_channel_data_field_36.field_id_36, exp_channel_data_field_36.field_ft_36, exp_channel_data_field_38.field_id_38, exp_channel_data_field_38.field_ft_38, exp_channel_data_field_39.field_id_39, exp_channel_data_field_39.field_ft_39, exp_channel_data_field_40.field_id_40, exp_channel_data_field_40.field_ft_40, exp_channel_data_field_41.field_id_41, exp_channel_data_field_41.field_ft_41, exp_channel_data_field_42.field_id_42, exp_channel_data_field_42.field_ft_42, exp_channel_data_field_43.field_id_43, exp_channel_data_field_43.field_ft_43 FROM exp_channel_titles AS t LEFT JOIN exp_channels AS w ON t.channel_id = w.channel_id LEFT JOIN exp_channel_data AS wd ON t.entry_id = wd.entry_id LEFT JOIN exp_members AS m ON m.member_id = t.author_id LEFT JOIN exp_channel_data_field_4 ON t.entry_id = exp_channel_data_field_4.entry_id LEFT JOIN exp_channel_data_field_5 ON t.entry_id = exp_channel_data_field_5.entry_id LEFT JOIN exp_channel_data_field_6 ON t.entry_id = exp_channel_data_field_6.entry_id LEFT JOIN exp_channel_data_field_15 ON t.entry_id = exp_channel_data_field_15.entry_id LEFT JOIN exp_channel_data_field_16 ON t.entry_id = exp_channel_data_field_16.entry_id LEFT JOIN exp_channel_data_field_17 ON t.entry_id = exp_channel_data_field_17.entry_id LEFT JOIN exp_channel_data_field_19 ON t.entry_id = exp_channel_data_field_19.entry_id LEFT JOIN exp_channel_data_field_23 ON t.entry_id = exp_channel_data_field_23.entry_id LEFT JOIN exp_channel_data_field_25 ON t.entry_id = exp_channel_data_field_25.entry_id LEFT JOIN exp_channel_data_field_29 ON t.entry_id = exp_channel_data_field_29.entry_id LEFT JOIN exp_channel_data_field_30 ON t.entry_id = exp_channel_data_field_30.entry_id LEFT JOIN exp_channel_data_field_31 ON t.entry_id = exp_channel_data_field_31.entry_id LEFT JOIN exp_channel_data_field_32 ON t.entry_id = exp_channel_data_field_32.entry_id LEFT JOIN exp_channel_data_field_33 ON t.entry_id = exp_channel_data_field_33.entry_id LEFT JOIN exp_channel_data_field_34 ON t.entry_id = exp_channel_data_field_34.entry_id LEFT JOIN exp_channel_data_field_35 ON t.entry_id = exp_channel_data_field_35.entry_id LEFT JOIN exp_channel_data_field_36 ON t.entry_id = exp_channel_data_field_36.entry_id LEFT JOIN exp_channel_data_field_38 ON t.entry_id = exp_channel_data_field_38.entry_id LEFT JOIN exp_channel_data_field_39 ON t.entry_id = exp_channel_data_field_39.entry_id LEFT JOIN exp_channel_data_field_40 ON t.entry_id = exp_channel_data_field_40.entry_id LEFT JOIN exp_channel_data_field_41 ON t.entry_id = exp_channel_data_field_41.entry_id LEFT JOIN exp_channel_data_field_42 ON t.entry_id = exp_channel_data_field_42.entry_id LEFT JOIN exp_channel_data_field_43 ON t.entry_id = exp_channel_data_field_43.entry_id WHERE t.entry_id IN (17,8,5)ORDER BY FIELD(t.entry_id, 17,8,5) mysqli_connection.php:116

  • The default max_join_size for MySQL 5.7.x is set very high... 18446744073709551615 to be exact. Could you log in to your MySQL server, and run this command: SHOW VARIABLES WHERE Variable_name LIKE "%max_join_size%"; and let us know what number you see? – jrothafer Dec 4 at 23:45
  • The command returns: max_join_size 1000000000 – thisyONE Dec 5 at 20:16

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Browse other questions tagged or ask your own question.