WordPress.org

Ready to get started?Download WordPress

Forums

Editorial Calendar
JSON 500 error... Varnish issue? (6 posts)

  1. sliceofpie
    Member
    Posted 2 years ago #

    I want to stress that this plugin is amazing and this error is an unusual error that mostly has to do with my specific scenario...

    I'm getting a 500 internal service error for most of the AJAX database requests that the plugin is doing - And getting the enormous red "There was an error contacting your blog" :-).

    This seems to be related to the size/time of the request (smaller requests when I decrease the # of visible weeks fare better - also we have a ton of posts), and its likely related to recently installing Varnish caching on our server...

    Anyone have any advice?

    Response Headers:

    Accept-Ranges bytes
    Age 0
    Cache-Control no-cache, must-revalidate
    Connection keep-alive
    Content-Encoding gzip
    Content-Length 20
    Content-Type application/json
    Date Fri, 09 Mar 2012 20:08:25 GMT
    Expires Sat, 26 Jul 1997 05:00:00 GMT
    Pragma no-cache
    Server Apache
    Vary Accept-Encoding
    Via 1.1 varnish
    X-Content-Type-Options nosniff
    X-Frame-Options SAMEORIGIN
    X-Varnish 1484031384

    http://wordpress.org/extend/plugins/editorial-calendar/

  2. Zack Grossbart
    Member
    Plugin Author

    Posted 2 years ago #

    Thank you for using the Editorial Calendar. I'm sorry you're having trouble with it.

    Where do you see the 500 error? Is there any more information about what's causing it? The error code 500 is just a generic message which means something went wrong on your server.

    If you disable Varnish does the issue go away? Does it matter which browser you're using?

    Thanks,
    Zack

  3. s_ha_dum
    Member
    Posted 2 years ago #

    zgrossbart,

    I see the same issue as described by sliceofpie, as near as I can tell. It occurs, for me, when debugging is on-- aka define('WP_DEBUG',true); Toggling WP_DEBUG switches your plugin between working and broken. sliceofpie appears to be talking about a production server so maybe that isn't it, but it produces the exact same message seen by sliceofpie.

    The problem is that you have a lot of lines like $post_type = $_GET['post_type']; and if ($post_type) { in the code which will produce notices if the variable or index isn't set. You aren't checking that the variable/index is set before trying to use them. AJAX/Javascript functions don't like those notices. I noticed the effect before with other plugins.

    Anyway, it really is a great plugin but I do recommend cleaning it up so it doesn't produce all those notices.

  4. Zack Grossbart
    Member
    Plugin Author

    Posted 2 years ago #

    Thank you for catching that. You're totally right. I'm making the change now to check for the item in the array before accessing it every time. It will be available in the next release.

    Thanks,
    Zack

  5. sliceofpie
    Member
    Posted 2 years ago #

    Thanks so much zgrossbart and apljdi.

    I was seeing the 500 error in Firebug. Turns out the larger requests were causing PHP to run out of memory, so increasing PHP's memory solved the issue for us - But sounds like the next version will be more efficient, awesome!

    Thanks again for this awesome plugin, our blog editor cannot live without it (and similar plugins do not compare...)

  6. s_ha_dum
    Member
    Posted 2 years ago #

    Very much appreciated. I look forward to the next update.

    Now, off to install your plugin on three different sites. :)

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic