May
2
2011

If you came here between April 28 and about an hour ago, you got a “couldn’t connect to database” error. Oops! Seems my limited memory EC2 instance got a little overwhelmed by php processes and decided the db server, drizzled, should die to make more room for PHP. Ooops! Time to drop pm.max_children.
I don’t have any monitoring setup for the site, so I just now figured it out. Until I get proper monitoring, I’ve installed this fancy bit of duct-tape upstart magic:
start on stopping
task
script
env | mail -s "$JOB is stopping!" me@myemail.com
end script
What does this do? Well is emails me whenever upstart gives up respawning something, or I manually stop a service.
Its not monitoring. I need monitoring. But this is a nice little hack to prevent a regression while I figure that out.
5 comments | tags: drizzle, PHP, ubuntu, upstart | posted in Cloud
Mar
23
2010
Ding ding ding.. in this corner, wearing black shorts and a giant schema, we have over 11 million records in MySQL with a complex set of rules governing which must be searchable and which must not be. And in that corner, we have the contender, a kid from the back streets, outweighed and out reached by all his opponents, but still victorious in the queue shootout, with just open source, and 12 patch releases.. written in C, its gearman!

Continue reading
1 comment | tags: gearman, MySQL, opensource, performance, PHP, Scalability | posted in MySQL, PHP, Scalability
Jan
22
2010
Queues seem to be all over the place right now. Maybe its like when I wanted a VW GTi VR6 a few years back. I kept seeing them pass me on the freeway and thought “crap, everybody is getting this hot new thing and I’m missing out!”.
I think everybody at one point looked at MySQL and tought.. “that would work fine as a queue system”. For low volume stuff, it *is* fine. But then somebody grabs your little transactional, relational, reliable queue system and plugs 5 million messages per hour through it, and somewhere, a man name Heikki cries.
So then you start to look around.. and for those of us who have meager budgets and tend to use open source, there aren’t a lot of choices. Continue reading
6 comments | tags: amqp, C, gearman, PHP, qpid, queuing, stomp | posted in Scalability
Nov
2
2009
If you’re an engineer, you hate testing. Seriously, who likes doing what those mere mortal “users” do? We’re POWER users and we don’t need to use all those silly features on all those sites. Just look at Craigslist, clearly an engineer’s dream tool.
For web apps, testing actually isn’t *that* hard. The client program (the browser) is readily available on every platform known to man, and they generally don’t do much more than store and retrieve data in clever ways. So, its not like we have to fire up a Large Hadron Collider to observe the effects of our web app. Continue reading
no comments | tags: development, opensource, PHP, selenium, software, testing, web | posted in Engineers, PHP, Scalability
Oct
26
2009
We had a fun time this week with TokyoTyrant. Recently it has become apparent that MemcacheDB has been all but abandoned. As fantastic as the early work was by Steve Chu, the project is in disrepair. That, coupled with the less than obvious failover for its replication combined to make us seek alternatives.

Continue reading
no comments | tags: berkeleydb, caching, Memcache, memcachedb, PHP, process, RTFM, testing, tokyotyrant | posted in Memcache, PHP
Mar
25
2009
It semeed so simple, just setup two memcachedb instances and point them at eachother. Instant fault tolerance, Right? If only it were so simple!
Its not entirely clear from the documentation how to setup memcachedb for fault tolerance. Here’s the procedures I’ve found useful.
Continue reading
2 comments | tags: fault tolerance, heartbeat, linux, memcachedb, PHP, reliability, Scalability
Feb
9
2009
So, I was working on getting Facebook’s seemingly amazing Scribe logging architecture setup to check it out. One of the requirements it has is ‘fb303′, which is included with Thrift in the contrib directory. I ran into this:
Continue reading
1 comment | tags: build, facebook, PHP, scribe, thrift
Dec
14
2008
So I was starting to play with Memcached for session storage, and I found a fairly big problem with justing memcached in its normal caching mode as a session store. It really just boils down to caching and storing of deterministic data being very different things that only look similar on the surface.
Continue reading
1 comment | tags: memcached, memcachedb, PHP, Scalability, sessions | posted in Scalability, Technology