WordPress.org

Support

Support » Plugins and Hacks » [Resolved] Debug Mode on by Default, Crashes Server Under High Traffic

[Resolved] Debug Mode on by Default, Crashes Server Under High Traffic

  • The plugin’s debug mode seems to be on by default, which means the plugin logs to the PHP error log on each and every page request (even if we don’t invoke a Grab Media video).

    Here’s an example from just 1 request:

    2013/05/24 11:47:36 [error] 1196#0: *344 FastCGI sent in stderr: "PHP message: -------------------------------------------------------
    PHP message: GrabPress:<line 679>GrabPress::allow_tags()
    PHP message: GrabPress:<line 175>GrabPressAPI::get_feeds()
    PHP message: GrabPress:<line 324>GrabPressAPI::validate_key()
    PHP message: GrabPress:<line 289>GrabPressAPI::call(GET, /user/validate?api_key=XXXXXXX)
    PHP message: status = 200, response ={"user":{"id":XXXX,"email":"XXXXX"}}
    PHP message: GrabPress:<line 171>GrabPressAPI::get_connector()
    PHP message: GrabPress:<line 120>GrabPressAPI::validate_key()
    PHP message: GrabPress:<line 289>GrabPressAPI::call(GET, /user/validate?api_key=XXXXXX)
    PHP message: status = 200, response ={"user":{"id":XXXX,"email":"XXXXXX"}}
    PHP message: GrabPress:<line 122>GrabPressAPI::call(GET, /connectors?api_key=XXXX)
    PHP message: status = 200, response =[{"connector":{"grabpress_version":"2.3.0","id":XXXX,"wordpress_version":"3.5.1","destination_address":"http://XXXX.com/xmlrpc.php","name":"XXXX","created_at":"2013-05-17T22:53:52Z","user_id":XXXX,"password":"XXXXXXX","destination_name":"XXXX","ap_embed_id":XXXX,"updated_at":"2013-05-20T19:43:41Z","username":"grabpress","zoho_lead_id":"XXXXXX","active":true,"email":"XXXXXX","connector_type_id":1,"ctp_embed_id":XXXX,"custom_options":{"blog_id":1}}}]
    PHP message: GrabPress:<line 326>GrabPressAPI::call(GET, /connectors/5398/feeds?api_key=XXXXXX)
    PHP message: status = 200, response =[{"feed":{"id":4142,"last_checked":"2013-05-24T13:37:20Z","submission_template_id":-2,"connector_id":XXX,"created_at":"2013-05-20T21:00:18Z","name":"Grab Video","embed_height":450,"url":"http://catalog.grabnetworks.com/catalogs/1/videos/search.json?keywords_and=&cate

    The log traffic brought one of our servers down under high traffic.

    The only way I found to turn debug mode off was to edit the plugin itself, by changing GrabPress.php, Line 34 from:
    static $debug = true;
    to:
    static $debug = false;

    Here’s the current plugin repo that shows the debug option as on by default:
    http://plugins.svn.wordpress.org/grabpress/tags/2.3.1/GrabPress.php

    Can we turn debug mode off by default, so that the plugin is production-ready, and can we get a debug on/off toggle in the admin instead?

    http://wordpress.org/extend/plugins/grabpress/

Viewing 5 replies - 1 through 5 (of 5 total)
Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘[Resolved] Debug Mode on by Default, Crashes Server Under High Traffic’ is closed to new replies.