Man, just ascend already.

Willow ,'Chosen'


Buffistas Building a Better Board  

Do you have problems, concerns or recommendations about the technical side of the Phoenix? Air them here. Compliments also welcome.

To-do list


Tom Scola - Jan 08, 2004 12:43:40 pm PST #6499 of 10000
Remember that the frontier of the Rebellion is everywhere. And even the smallest act of insurrection pushes our lines forward.

I'd thought the tradeoff would lean towards one large transaction as opposed to setting up and tearing down many small ones,

It's not the transactions that are a problem, it's the opening and closing of connections to the database. You can have many transactions per connection, we just don't currently do it that way, and that's what we need to fix.


§ ita § - Jan 08, 2004 12:46:45 pm PST #6500 of 10000
Well not canonically, no, but this is transformative fiction.

Is this a serious enough issue that you'd recommend changing the flow even if we moved to Postgres? I really want to move, because the triggers and stored procedures, etc. look like they should clear up post numbering issues.


Tom Scola - Jan 08, 2004 12:52:09 pm PST #6501 of 10000
Remember that the frontier of the Rebellion is everywhere. And even the smallest act of insurrection pushes our lines forward.

In my mind, the code is a lot more malleable than the database is. There's nothing inherently wrong with the database. In fact, none of our SQL queries will need to change, just how they're executed in the code.


§ ita § - Jan 08, 2004 12:56:08 pm PST #6502 of 10000
Well not canonically, no, but this is transformative fiction.

There's nothing inherently wrong with the database

Well, except it's not as full featured as I'd prefer, and there's that bug Rob found.

I've wanted to change to Postgres since shortly after we went live. It's completely unrelated to the connections issue.

What I'm wondering -- if the back end change is a given, how does that affect your urgency on the page model change?


Tom Scola - Jan 08, 2004 1:00:42 pm PST #6503 of 10000
Remember that the frontier of the Rebellion is everywhere. And even the smallest act of insurrection pushes our lines forward.

if the back end change is a given, how does that affect your urgency on the page model change?

The new-connection-for-each-transaction thing needs to be fixed, no matter what database we're using. There should be one sql connection per page view (and if those connections can be cached across page views, even better).

If the loading-the-entire-query-into-memory thing could be fixed for just threadsuck, that would probably be good enough.


§ ita § - Jan 08, 2004 1:03:56 pm PST #6504 of 10000
Well not canonically, no, but this is transformative fiction.

The new-connection-for-each-transaction thing needs to be fixed

That can be done really quickly -- because if the connection isn't closed at the end of the transaction (as it originally wasn't -- the change was made as a response to the errors), it's one connection per page. But we're still fucked that way. MySQL doesn't like counting.

And to cache across views, isn't that where pconnect comes in? With suitable server tuning? Very little code changes there.

The loading the whole page thing is a larger change, though.


Rob - Jan 08, 2004 1:45:44 pm PST #6505 of 10000

The counting part of MySQL that was broken had to do with the per-user connection limit. We don't have that turned on here, so there shouldn't be an issue. Taking out the explicit closes would be a good thing to do now.


§ ita § - Jan 08, 2004 3:14:19 pm PST #6506 of 10000
Well not canonically, no, but this is transformative fiction.

Explicit closes are now gone.


msbelle - Jan 08, 2004 3:44:50 pm PST #6507 of 10000
I remember the crazy days. 500 posts an hour. Nubmer! Natgbsb

So Tom, are you a choc chip, oatmeal, or sugar cookie kind of guy? Step up, claim your baked goods. Otherwise you'll get some low-fat no sugar spelt bread, and really, we all know you don't want that.


Karl - Jan 08, 2004 10:44:53 pm PST #6508 of 10000
I adore all you motherfuckers so much -- PMM.

Maybe it's just how threads show up in a Linix ps listing.

Nitpick - it's spelt Linux. Also, yes, each (heavyweight) thread shows up in the ps listing, unlike BSD and some Unices.

Tom, I would seriously recommend writing a test case and comparing the performance of a 'threadsuck' type exercise with the connectAndQuery route versus the row-by-row-fetch route. MySQL was originally designed as a database with -very- (compared to something like PostgreSQL or Oracle) lightweight connections. Let's try hard to quantify the difference here before we talk about re-writing whole sections of code.