使用wordpress multisite,在尝试cutomize主题时得到了这个错误日志:
WordPress database error MySQL server has gone away for query SELECT option_value FROM tblog_c4c.wp_6010_options WHERE option_name = 'post_count' LIMIT 1 made by do_action('customize_controls_enqueue_scripts'), call_user_func_array, WP_Customize_Widgets->enqueue_scripts, WP_Customize_Widgets->get_available_widgets, WP_Customize_Widgets->get_widget_control, call_user_func_array, wp_widget_control, call_user_func_array, WP_Widget->form_callback, NLposts_Widget->form, get_blog_details, get_option, m_wpdb->query
和浏览器显示504 Gateway Time-out
已经通过以下方式增加了时间限制:
set_time_limit(0);
ini_set('mysql.connect_timeout', '0');
ini_set('max_execution_time', '0');
有没有解决方案?
答案 0 :(得分:0)
您可以通过在my.cnf中设置max_allowed_packet = 16M并重新启动mysql来修复它