River: I know you have questions. Mal: That would be why I just asked them.

'Objects In Space'


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


Jon B. - Aug 01, 2003 10:14:18 am PDT #4440 of 10000
A turkey in every toilet -- only in America!

"200 concurrent mysql connections at the same time"

I find it hard to believe that there are 200 users on at the same time, but maybe I underestimate the number of lurkers. Also, I don't know anything about what constitutes a mysql connection. Is the code opening multiple connections for one user before closing any of them? Can anyone explain the concept in English?


Jessica - Aug 01, 2003 10:19:01 am PDT #4441 of 10000
And then Ortus came and said "It's Ortin' time" and they all Orted off into the sunset

I would guess that every pageview constitutes at least one MySQL connection, but ita would know for sure.


Typo Boy - Aug 01, 2003 10:20:21 am PDT #4442 of 10000
Calli: My people have a saying. A man who trusts can never be betrayed, only mistaken.Avon: Life expectancy among your people must be extremely short.

We have around 1000 registered users total. twenty percent of our users on line simulataneiously would be a lot.

And yeah we should be able not only limit it to one connection per user logged on, but actually open (say) fifty connection permanently and then share them among users queuing requests.


Kristen - Aug 01, 2003 10:20:25 am PDT #4443 of 10000

No, it's not users. I had a definition around somewhere, I think, from before we moved in. I'm not sure if it was at WX or PF.

Is the code opening multiple connections for one user before closing any of them?

It sounds like it is, to me. Then again, I've never looked at the code and probably wouldn't be able to tell even if I had.


Jon B. - Aug 01, 2003 10:22:14 am PDT #4444 of 10000
A turkey in every toilet -- only in America!

I would guess that every pageview constitutes at least one MySQL connection

That's what I thought. But once the page is downloaded, the connection should be closed. I thought that "200 concurrent mysql connections at the same time" would mean that 200 requests for pages are being made at the same time. Which I find hard to believe.


Typo Boy - Aug 01, 2003 10:22:55 am PDT #4445 of 10000
Calli: My people have a saying. A man who trusts can never be betrayed, only mistaken.Avon: Life expectancy among your people must be extremely short.

I understand we probably have multiple queries per page view. But there is no reason they can't be done sequentially using the same connection. That would limit it to one connection per user.

And as I said we could actually have queries use a static pool of connections - using less than one connection per user. BEfore getting that drastic it ought to be comparatively easy to limit us to one connection per user.


Tom Scola - Aug 01, 2003 10:24:10 am PDT #4446 of 10000
Remember that the frontier of the Rebellion is everywhere. And even the smallest act of insurrection pushes our lines forward.

It's possible that there is a bug in the code where MySQL connections aren't properly closed in all circumstances, causing them to accumulate.

This would be consistent with the pattern we've been seeing, where the server gets slower and slower, and finally crashes, but when it comes back up again it is fast again.


Jon B. - Aug 01, 2003 10:24:12 am PDT #4447 of 10000
A turkey in every toilet -- only in America!

No, it's not users.

I understand that Kristen. But I wouldn't expect more than one connection per user at any point in time. Unless I misunderstand what a connection is....

t edit Or what Tom said. I hope he's right cause.... easy fix.


Jessica - Aug 01, 2003 10:24:22 am PDT #4448 of 10000
And then Ortus came and said "It's Ortin' time" and they all Orted off into the sunset

That's what I thought. But once the page is downloaded, the connection should be closed.

That'd be my guess too.

I thought that "200 concurrent mysql connections at the same time" would mean that 200 requests for pages are being made at the same time. Which I find hard to believe.

That would also be my guess, and it does sound a bit excessive. Especially since I thought we were a little quieter than usual today.


Typo Boy - Aug 01, 2003 10:24:52 am PDT #4449 of 10000
Calli: My people have a saying. A man who trusts can never be betrayed, only mistaken.Avon: Life expectancy among your people must be extremely short.

And I suspect we are closing connections once the page is loaded. But if we use a bunch of connections to load a page, and a bunch of people post or read at the same time, I can see how we could get up there.

We really ought to (and can easily ) limit it to one connection per page load.