Do you use PHP-FPM or any other way to process PHP?
Do you use APC?
Do you use any caching plugins, particularly W3 Total Cache?
I was using php-fpm, APC, and w3. However, I disable every plugin and theme and had the same problem. I also installed apache2.2 via the lamp-install method and stopped the NGINX service to see if NGINX or PHP-FPM was the problem. I used the default Apache and PHP implementation that comes with UBUNTU. This is still happening.
I also have a problem with users seeing blank themes when they preview a theme. If they enable the theme it works fine, but the preview before enabling does not. Again, on both NGINX and APACHE default packages with Ubuntu Server 12.04 and 13.04.
I am at my wits end here. I tried chmoding everything to 777. Thought it might be a permissions issue, apparently not.
Sorry to know all the weird things. If I were you, I’d start from scratch and / or start without WP multisite, probably in another host or OS. Sometimes, even the hosts pre-package certain tools / software / applications that affects the sites hosted in it.
Well that is the thing. I am the host. I have my own dedicated servers with a vm setup. This is on one of my particular VM’s. Multisite is part of the strategy for this project. To not use it would be to trash the project.
I have full control over php, mysql, and apache/nginx. I’m pretty much using default values for Ubuntu Server.
I just tried converting my database to utf8 and collation of utf8_unicode_ci. I noticed many of the tables were in latin and other formats. The database is in utf8 now but I still have the same problem.
Not sure if this case is multisite specific, but I’ve seen threads with normal wp installs with the same problem.
I haven’t worked with multisite a lot. Most of the sites that I manage are single sites. That’s why I recommended to start with it. It’s true that the same issue has occurred on single site installations as well.
Did you check the PHP/WP/Nginx/Apache logs? Have you enabled debugging in one or all of these?
Have you tried wp-cli tools? It, sometimes, provides more info than hanging, when something goes wrong.
I think I may have figured out the problem. I turned debugging on in wp and slowly went through all the errors and fixed them one by one. I eventually came to this:
ob_end_flush(): failed to send buffer of zlib output compression (1)
Some research indicates that WordPress does not like zlib compression and has caused problems with updating plugins among other things.
http://core.trac.wordpress.org/ticket/18525
I disabled zlib compression in my /etc/php5/fpm/php.ini
; Transparent output compression using the zlib library
; Valid values for this option are 'off', 'on', or a specific buffer size
; to be used for compression (default is 4KB)
; Note: Resulting chunk size may vary due to nature of compression. PHP
; outputs chunks that are few hundreds bytes each as a result of
; compression. If you prefer a larger chunk size for better
; performance, enable output_buffering in addition.
; Note: You need to use zlib.output_handler instead of the standard
; output_handler, or otherwise the output will be corrupted.
; http://php.net/zlib.output-compression
zlib.output_compression = Off
Now all those issues seem to be fixed! Theme previews now load, and the plugins issue appears to be gone. The issue was sporadic so I’ll report back in 24/48 hours.
Thanks for this post. This was driving me mad on my test server, everything was good on production and I couldn’t work out why. Turning zlib compression off did the trick!
No problem. It has been stable for me this entire time. So it is indeed a 100% fix for me.