Assuming that the biggest trouble really is just that we occasionally have 100 people all calling the database at the same time--is there any way to limit that on our end, directly? Hit 50 open connections, and all subsequent attempts have to wait 5 seconds and check again? Or it is impossible to divorce the attempt from the actual connection? Or would such a solution be, in its own way, as (or more) taxing?
(It's been too long since I was actually studying this stuff.)
DX, if you want to email me how you're doing the archive stuff, I can take some of it on tomorrow, probably get a couple of threads done.
I think getting rid of auto-refresh could be a good idea too -- the number of people who would sit there going refreshrefreshrefresh would be, I'll guess, far less than those who just leave it up for an hour or two in the background refreshing every 10 minutes.
Also, we're going to see if we can further optimize the code, no?
Can everyone that's not liese who wanted to help look at the SQL please drop me a line at my profile address so I know where to send stuff?
This article seems like it might suggest something to try to reduce the number of concurrent SQL connections.
Brain-storming...
idea 1: Changing the layout
Would it be better or worse if we reformed the board, so that message center wasn't a separate page, but instead showed up at the end of each thread, under the posting box.
It might be too messy/user-unfriendly/coding resource intensive to make this change. But I'm just thinking. I read a thread. I post (or not). I then load message center. I then load my next thread. There's an extra page load.
Now, I realize I can just use "read new" - but I don't like to use read new. I pick my threads according to my moods. The Buffy thread might have picked up 10 posts while I was in Bitches, but if I left when everyone was just starting to talk about Xander's Lie, I know what the content of those 10 new posts is likely to be, so I wait until I think the convo has moved on.
Just a thought.
idea 2 - Question about auto-refresh:
This item is a partial X-post from Bureaucracy
Do any tech-shaped people know, when the board does auto-refresh, does it count the X minutes on its own clock, or base it on exact seconds/minutes the user has been on the page? What I'm asking is, if it knows JoeSchmoe loaded Message Center at 3:23 and 24 seconds, and JoeSchmoe's refresh is set for 10 minutes, does it refresh for JoeSchmoe at 3:33 and 24 seconds, or just at 3:33? If it just rounds to the minute, and if enough users have their refresh set to the same amount of time, then that could account for a lot of the my sql connections being open at the same time.
If we don't/can't know, maybe we should completely disable auto-refresh and see what it does for us. The chance that 100 users will manually refresh at the exact same time is way lower, than that the board is refreshing them all at the same time.
edited to add
Idea 3 - Cut down on number of times a page is loaded
The Bronze Beta is coded so that when anyone links using the
t a href="http://www.URL.com"
Link Name
t /a
,
it is converted to the link coding that opens up a new window, in other words, it is converted to
t a href="http://www.URL.com"target="_blank"
Link Name
t /a
Is it possible to do this here?
If not, is it possible to forbid the code that doesn't include
target="_blank"
?
If neither of these things are possible, never you mind.
If either is possible, here's why I'm asking:
If someone links me to a Buffy spoiler that takes me away from the b.org spoilers thread, I click on the link, then come back and reload b.org again, either by using my browser's back button, or my b.org favorites. Either way, I'm at least re-loading the same page, twice. Sometimes, I'm reloading the main page, and then the thread page, and then paging back a page to find where I left off. That's 1 to 3 unnecessary page loads.
And? If I click a link during threadsucking, I am actually retrying the whole threadsuck.
If we cause or require link coding to open a new window, it'll be less strain on our board.
There's another thing we could do that might help, which is enable page caching again. We tried this back in December, but there were complaints that the Message Center wasn't updating. The conversation runs from here:
DXMachina "Buffistas Building a Better Board" Dec 7, 2002 8:37:23 pm PST
to here:
ita "Buffistas Building a Better Board" Dec 7, 2002 9:28:23 pm PST
Right now, if you're paging through a thread, then hit the back button, rather than just showing you a cached version of the last page you looked at (as it did at WX), the system goes back to the database and requeries the database. This is another potential drain if you hit the back button (or the forward button) a lot.
DX, that breaks the refresh key. That's why I disabled it before. I really, really, want to work out the right way to do it, because ... that's a big key.
Also breaks the message centre, which I'd rather do explicitly.
Go have a look at the test site and see.
I went to the test site, and it works perfectly for me in Mozilla. It caches the pages unless I explicitly hit the reload button, and then they reload. I see your point about the refresh button in IE. Which is a shame, because otherwise it does exactly what we want it to. There has to be a setting somewhere in IE. Bother.
that breaks the refresh key.
I can confirm that. Damn.
t edit
I was testing with IE.