After updating my server from testing to Squeeze it suddenly crashed after running a high CPU % perl script.
Being unresponsive I reset the machine to reboot it.
After booting up and testing websites running on it I came along an odd PHP error;
Call to undefined function http_post_data()
Probably due to PHP updates from Lenny/testing to Squeeze.
This error is caused by not having installed PECL-HTTP (and php-pear php5-dev libcurl3-openssl-dev)
However, PECL-HTTP had been installed for ages and running the pecl install command resulted in this:
# pecl install pecl_http
pecl/pecl_http is already installed and is the same as the released version 1.7.0
Some quick Googling didn’t come up with a simple fix.
I then tried to reinstall PECL-HTTP (by uninstalling and reinstalling it)
# pecl uninstall pecl_http
Unable to remove "extension=http.so" from php.ini
uninstall ok: channel://pecl.php.net/pecl_http-1.7.0
# pecl install pecl_http
downloading pecl_http-1.7.0.tgz ...
Starting to download pecl_http-1.7.0.tgz (173,979 bytes)
Which luckily did solve my issue…
So reinstalling does actually solve stuff on Linux 😡
Be sure to have extension=http.so in your php.ini and to restart php if it’s running with fastcgi or restarting Apache after making the changes.
Right, playing around with my blog again. Wasn’t really that happy anymore with my nginx rproxy caching. Especially that for some reason, lately, every (php) request got at least one hit to the backend Apache server, while it used to cache the generated html for 30 mins.
And well, performance just wasn’t good enough. So I said bye to one.rootspirit.com, and hi to vm1.rootspirit.com a couple of days ago. Vm1 is no longer the nginx proxy, but is hosting my whole blog now. No more Apache for me.
Now to see if performance increases and if it was any point in changing.
Oh, and all static/upload/image requests are now rewritten to a new domain (static.0x04.com). Gives me to option to move static pages to a different webserver/host in the future. And why 0x04.com and not static.yeri.be or static.tuinslak.org ? Well, don’t know. Just like my “0x04” domain name! 😀
Oh well… Just playing around…
Been slacking a bit lately, but here they are:
- /etc/nginx/nginx.conf // general nginx config
- /etc/nginx/sites-available/blog // my current (as of posting this) rproxy settings for this blog
- /etc/nginx/conf.d/proxy.conf // reverse proxy related config
Probably won’t change a lot to my performance, but I’ve mounted the nginx reverse proxy cache in a tmpfs mount.
none on /var/cache/nginx/blog type tmpfs (rw,size=512m)
none 512M 47M 466M 4% /var/cache/nginx/blog
Let’s see what performance boosts this will give. 😛