[SOLVED] HTTP Error 500 when trying to post to newsletter

edited November 2012 in Newsletter plugin
I'm having a bit of an issue that crept up on me last night.

Our site (fishheadsclub.com) has 8400 subscribers. We tried to publish a blog post which was 5500 words (I know!) - but when hitting the Publish or Update button I get the following error:

HTTP Error 500 (Internal Server Error): An unexpected condition was encountered while the server was attempting to fulfil the request.

The post did publish - but the newsletter didn't queue. I went to the newsletter history and the post is there, but has 0 emails queued. I tried to requeue the email. The Create Newsletter page was loading for just over 1 minute before it gave up and left me with an empty screen.

Back to the email history and again, no emails have been queued.

We're running Newletters 3.9.4 on WordPress 3.4.2. PHP 5.3.3.

Any help etc.

Comments

  • 5 Comments sorted by
  • Vote Up0Vote Down
    Thank you for your post.

    The 500 Internal Server Error could mean that PHP is running out of memory.
    Turning on debugging in the "wp-mailinglist/wp-mailinglist-plugin.php" file should reveal the problem.

    What is your PHP memory_limit directive? Can you increase it?

    If the problem persists after increasing the PHP memory_limit, please submit a ticket to our helpdesk so that we can quickly investigate and solve it for you.

    I look forward to your positive response!
  • Vote Up0Vote Down
    Thanks for the quick reply - I ended up submitting a ticket after I posted so just ignore that :)

    The PHP memory_limit directive is 128M. I'm not that keen on increasing the limit beyond this but I'll double it for this specific post and see what happens.

    I'll check the debugging out as well and feedback on that front.

    Cheers!
  • Vote Up0Vote Down
    OK - I bumped up the memory and that failed from the WP Post page again.

    Going to the newsletter software I had plenty of these (pages of them):
    Function ereg_replace() is deprecated in /var/www/web7/web/wp-content/plugins/wp-mailinglist/helpers/html.php on line 508

    As suggested, it was a memory error though:
    Fatal error: Allowed memory size of 268435456 bytes exhausted (tried to allocate 62307 bytes) in /var/www/web7/web/wp-content/plugins/wp-mailinglist/models/queue.php on line 216

    Making the post shorter and linking to the page has worked for now, but it seems a little inefficient as it's willing to gobble up so much memory (albeit with an unusually long email).

    Thanks so far!
  • Vote Up0Vote Down
    Thank you for your response, John.

    Ok, the first ereg_replace() error is just a PHP warning, it's harmless.
    The problem comes in with the PHP fatal error about the memory being exhausted.

    Great, so reducing the content length of the newsletter has solved the problem?
    You can increase the PHP memory_limit even more though, that should also helped.

    May I mark this as solved? Do you need further asssistance with it?
  • Vote Up0Vote Down
    Hi Phil,

    Thanks for your help - I know that the ereg_replace() error was benign - just thought it was worth mentioning :)

    Yeah, mark it as solved. My only issue is that Fish's blog posts tend to be quite lengthy - and I don't like leaving the memory usage up, as I don't want a bug to chew up the server resources. I'm sure you understand!

    Can I just suggest that it would be worth considering an alternative way of processing these emails so that it doesn't load every single one into memory which it processes the tags. I know we have a niche usage case, but it is causing trouble for me in what is otherwise fine software. :)

    If the post fails to mail out, then it also prevents other plugins from operating such as the social network sharing.

    Anyway, thanks again for your help!
Sign In or Register to comment.