stats plugin hangs PHP process for 300 seconds if port 443 is blocked
-
While running stats plugin on a server which is firewalled for outgoing HTTPS connections, loading the page at wp-admin/index.php causes an ajax call to ‘index.php?page=stats&noheader&dashboard&width=988’, which in turn tries to open https://dashboard.wordpress.com, with a timeout of 300 seconds, instead of the default 5 seconds:
900 $url = 'https://dashboard.wordpress.com/wp-admin/index.php'; 901 902 $url = add_query_arg($q, $url); 903 904 $get = wp_remote_get($url, array('timeout'=>300));
This hangs the PHP process for 5 minutes, since the connection is blocked by iptables. It looks like a server hang, and is hard to find, since wp-admin page loads fine, but subsequent reloads fail.
Maybe this works correctly with PHP-FPM, but until this is stable enough, I suggest to remove the 300 seconds timeout back to the default 5 seconts.
- The topic ‘stats plugin hangs PHP process for 300 seconds if port 443 is blocked’ is closed to new replies.