How poorly does O'Reilly pay their authors? A book the size of most of their tomes, and at the prices they charge, should be a 5-figure advance in any other part of the industry.
If you want to make significant money as a tech book author, I'm guessing you have to do what Brennan Dunn does, and self-publish your book and market it yourself. I'm guessing that after you've published an O'Reilly book, you could make a pretty nice sum if you do this on your next book.
No complaints though! O'Reilly is a brilliant publisher and I never had any expectation of making money from it. It was just a thrill to be able to get the bloody thing off my chest at last.
And also bear in mind that an advance is just that: it comes off the royalties, so you may not end up making any money for quite a while.