Caching for dummies

Caching is one of the things recommended whenever something is slow — “Your [database, website, server]? Well, duh! You need a cache!”. All things aside, it’s not always easy to cache stuff. I find myself often in situations where I can’t cache at all or where a caching solution is complex as hell to implement. All of the sudden you need to dissect your page and lazy load half of it with Ajax — bah....

April 6, 2010 · 3 min

Zend Framework: Slow automatic view rendering

So I posted something on Twitter today, which wasn’t exactly news to me. I was more or less pointing out the obvious. From a couple follow-up tweets, I guess, I need to explain more. The idea My thesis is that there’s a gain in page rendering time when I disable automatic view rendering and use explicit render calls ($this->render('foo');) inside my controllers. And to cut to the chase, there is. On our app, I measured a 12% improvement using Xdebug’s profiler — simple before-after-style....

March 29, 2010 · 2 min

Redis on Ubuntu (9.04)

A small howto to get the latest redis-server and a webinterface on Ubuntu. Installation … redis should listen on localhost:6379. You may need to get i386 instead of amd64 if you run 32bit. Tweaks You may need to add the following to /etc/sysctl.conf: … that is, especially if you run in a VE (e.g. inside xen). All other configs are in /etc/redis/redis.conf. Web Because web interfaces are so simple, I decided to get redweb....

March 19, 2010 · 1 min

PHP parse errors with cgi and nginx

So for whatever reason, it took me a while to figure this out earlier today: 2010/03/15 15:44:16 [info] 22274#0: *148224 client closed prematurely connection, so upstream connection is closed too while sending request to upstream, client: a.a.a.a, server: localhost, request: "GET / HTTP/1.1", upstream: "fastcgi://unix:/tmp/.fastcgi.till/socket:", host: "localhost" 2010/03/15 15:44:16 [info] 22274#0: *148207 client closed prematurely connection, so upstream connection is closed too while sending request to upstream, client: a.a.a.a, server: localhost, request: "GET / HTTP/1....

March 15, 2010 · 1 min

DB_CouchDB_Replicator

Update, 2010-03-04: I just rolled a 0.0.2 release. In case you had 0.0.1 installed, just use pear upgrade-all to get it automatically. This release is trying to fix a random hang while reading documents from the source server. I also opened a repository on Github. --- As some may have guessed from a previous blog post we are currently running a test setup with CouchDB lounge. My current objective is to migrate our 200 million documents to it, and this is where I am essentially stuck this week....

March 3, 2010 · 2 min