• Resolved deltafactory

    (@deltafactory)


    Yesterday I ran into an issue where multiple factors combined to produce a bug on the Newsletter listings page. The issue manifests as an empty list of Newsletters, despite having many of them. No data is actually lost as far as I can tell.

    For those looking for a quick fix, this problem may be mitigated by changing the items per page under Screen Options.

    Details:
    The call to the MailPoet JSON API (endpoint: newsletters, method: listing) produces in no output when the body size is over 512435 characters. This seems curiously close to a 512K limit though I haven’t traced what enforces it. I *have* confirmed that the issue is in the output itself – execution continues up until the final echo wp_json_encode(...) in the Response->send().

    The main issue that I hope to address is the fact that the payload is 512K for a result set of 20 newsletters. This is horribly inefficient.

    A significant contributing factor is that the rendered HTML and text bodies of all currently sending and previously sent newsletters are included in the payload.

    Thankfully, we are provided a filter that allows a temporary solution. Ideally, code could be optimized so as to not query those fields from the database in the first place. There are also numerous opportunities for caching, especially for a queue which has been sent and completed.

    @wysija, let me know if I can provide further detail about my situation and environment.

    • This topic was modified 6 years, 2 months ago by deltafactory. Reason: format
Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter deltafactory

    (@deltafactory)

    Following up: I have confirmed that the output error/missing newsletter issue is caused by a separate plugin but is directly related to the size out of the output.

    Optimizing/reducing the Newsletter listing request is still important me and my (premium) clients. Thanks.

    Hi, there @deltafactory,

    Thanks for the thorough investigative work and providing your results. Our developers are constantly looking into and optimizing the performance of all pages and I’ll pass your feedback along to them. ??

    Thanks!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Newsletter AJAX call hits size limit’ is closed to new replies.