First of all, 'Posse?' Passé

Cordelia ,'Potential'


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


§ ita § - Aug 26, 2003 11:05:44 am PDT #4844 of 10000
Well not canonically, no, but this is transformative fiction.

All the config info you could ever want, insent, Rob.


Rob - Aug 27, 2003 1:56:11 pm PDT #4845 of 10000

I spent a lot of time investigating PHP and MySQL last night and learned a lot. I wanted to share some of it with everyone because I think some of the things were doing to limit connections to the database might put even more load on the server. I'd like to recommend that folks not change their reading habits a lot until we figure out exactly what's causing the excess load.

I now have a tiny little Phoenix board running on my Mac at home for testing. I've been digging into the source code of PHP and MySQL (gotta love open source) and I'm starting to understand how this all fits together.

I now suspect that the problem isn't so much too many connections, as too many MySQL threads running at the same time. Each thread uses exactly one connection, but we're allowed to have up 128 of them cached. Recently ita checked and we had 58 threads in the cache, only three of them running, but 26 of them holding a connection. I don't think the cached threads are every deleted, so eventually we'll max out the cache.

Now this new server has a 5 minute idle timeout (as opposed to the 8 hour default), so that might explain why only 26 of the cached threads have a connection. But the threads themselves consume a lot of resources, so they might actually be what's causing the server problem, more than the connections themselves.

I'm looking to see if they can limit our use of threads without affecting other MySQL users on the server. I think there might be a way to tell Apache to limit the buffista.org domain to fewer concurrent threads, which would limit the MySQL threads as well.


Kristen - Aug 27, 2003 2:00:02 pm PDT #4846 of 10000

I give up.


Consuela - Aug 27, 2003 2:03:44 pm PDT #4847 of 10000
We are Buffistas. This isn't our first apocalypse. -- Pix

Noo, don't give up, Kristen.

Hang in there. Rob's in geek Sherlock Holmes mode, which is all for the good.


DXMachina - Aug 27, 2003 2:23:10 pm PDT #4848 of 10000
You always do this. We get tipsy, and you take advantage of my love of the scientific method.

I now suspect that the problem isn't so much too many connections, as too many MySQL threads running at the same time.

Just to be clear to the non-techies (and even some of us techies), Rob, you're not talking about threads in the sense of Natter, Bitches, etc. You're talking about threads of instructions to the database, or something similar, right?


Rob - Aug 27, 2003 2:31:39 pm PDT #4849 of 10000

Yes, I'm talking about threads of instructions to the database. Boy I wish I'd thought of that potential area of confusion up front.


§ ita § - Aug 27, 2003 2:33:46 pm PDT #4850 of 10000
Well not canonically, no, but this is transformative fiction.

Yeah, he mean threads as in the technical term, which is like one instance of a program running -- the details are a) not so important and b) going to be badly explained by me, so never mind.

However, the tech guy says it's connections, not threads, so we need to focus on addressing what he sees as the problem. He calls the shots.

edit: Or what Rob said.


Rob - Aug 27, 2003 2:36:55 pm PDT #4851 of 10000

Is it total number of connections over a period, or max concurrent connections that they are concerned about?


§ ita § - Aug 27, 2003 2:40:48 pm PDT #4852 of 10000
Well not canonically, no, but this is transformative fiction.

I think it's the # of connections open at that "moment", but I'll double check.


Liese S. - Aug 27, 2003 7:33:59 pm PDT #4853 of 10000
"Faded like the lilac, he thought."

Yup, as I recall it was max concurrent connections that are the deal.