Mailpoet Wordpress Plugin - Exception

I am using the MailPoet plugin to create newsletters which has been working ok. However, after creating my 3rd newsletter, an exception is experienced and the newsletter list isn’t displayed. I have deleted the newly created newsletter directly from the mailpoet database using phpmyadmin, the error disappears and the previous 2 newsletters are once again displayed in the list. If I create a new basic one, the error returns and no newsletters are displayed.

From my investigations, I trust that this is to do with SQL_BIG_SELECTS not being enabled on your servers and there wouldn’t be a workaround?

I have logged a call with the Mailpoet support team also, incase it’s something they need to address.

This relates to the wordpress dashboard.

Many thanks!

Error below:

An exception occurred while executing ‘SELECT d0_.newsletter_id AS sclr_0, COUNT(DISTINCT d0_.subscriber_id) AS sclr_1 FROM wp_mailpoet_statistics_opens d0_ WHERE d0_.newsletter_id IN (?, ?, ?) AND ((d0_.user_agent_type = ?) OR (d0_.user_agent_type IS NULL)) GROUP BY d0_.newsletter_id’ with params [7, 4, 3, 0]: 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

Looking at the documentation of MySQL, this is a server setting that stops the server from executing a query that likely touches a large number of rows.

That’s good, because a query that touches a large number of rows would take a long time to execute and cause high load on the database server, which is bad for everyone.

The limit is on our servers is a bit lower than most other places, the limit is set to 4 million rows on our hosting. So if this mailpoet_statistics_opens table counts many millions of rows, you could run into this limit.

It may be possible to fix this issue by adding some relevant indexes to the table, but you have to be careful when making database changes to a table you for which you don’t make the code yourself. This is something Mailpoet should fix I think.


Thank you for your response. This is what I had discovered and you have now clarified. I find it difficult to see how mailpoet would be touching such a high number of rows when there is only 3 newsletters! Perhaps bad coding.

I shall wait for a response form mailpoet. Until then I have reverted back to my original solution with an external service. Thanks again.


This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.