List:General Discussion« Previous MessageNext Message »
From:Reindl Harald Date:April 2 2013 9:21pm
Subject:Re: How to change max simultaneous connection parameter in mysql.
View as plain text  

Am 02.04.2013 23:14, schrieb Rick James:
> (Thanks for the comment, spameden.)
> Well, I was going to drop the thread, but he baited me.  I _do_ know something about
> web serving...

maybe

> Should I recount the number of times I have traced a database meltdown back to
> MaxClients being too big?  They are _ugly_ meltdowns -- hundreds of point-queries
> stumbling over themselves, flooding the slowlog with queries that should never take more
> than milliseconds.  More and more db requests come in, non finishing, thereby stalling the
> web server threads, etc.

been there, done that
it is a matter of the application design to avoid deadlocks in such cases

> Another point to make -- once a web server (Apache or...) has saturated the CPU (or
> other shared resource), there is really no advantage, only disadvantage, in starting more
> web pages.  The will simply contend for the saturated resource, thereby slowing down _all_
> threads.  It is better (at this point) to queue up (or drop) further requests, thereby
> giving the CPU a chance to actually finish something.

but with 20-100 requests a webserver these days is NOT saturated
MaxClients 20 is laughable

i had a high trafic site with MaxClients set to 500, driven with our CMS-system
teh CPU load was at 80% and the page got damned slow because you have to wait
before your images could be loaded

after raise MacClients to 600 it ran smooth, the CPU was around 85%
again: 20-100 MaxClients is laughable and only suiteable for a
dedicated, low-powered machine hosting only one domain

> Yet another point...  If
>    [ SUM(MaxClients) over the web servers you have ] >
>    [ SUM(max_connections) over the Slaves ],
> then you are threatening to have mysql refuse connections

no, my db-layer is traing again for some times and the chance to get a free slot
because other workers are serving images is proven in practice damned high


> 
>> -----Original Message-----
>> From: Reindl Harald [mailto:h.reindl@stripped]
>> Sent: Tuesday, April 02, 2013 8:29 AM
>> To: mysql@stripped
>> Subject: Re: How to change max simultaneous connection parameter in
>> mysql.
>>
>>
>>
>> Am 02.04.2013 16:09, schrieb spameden:
>>> 2013/3/24 Reindl Harald <h.reindl@stripped
>>> <mailto:h.reindl@stripped>>
>>>
>>>     Am 24.03.2013 05:20, schrieb spameden:
>>>     > 2013/3/19 Rick James <rjames@stripped
>> <mailto:rjames@stripped>>:
>>>     >>> you never have hosted a large site
>>>     >> Check my email address before saying that.
>>>     >
>>>     > :D
>>>
>>>     as said, big company does not have only geniusses
>>>
>>> I do not judge only on 1 parameter, Rick has been constantly helping
>>> here and I'm pretty sure he has more knowledge on MySQL than you.
>>
>> but the MySQL knowledge alone is not enough in context of a webserver
>> not to say irrelevant
>>
>>>     >> 20 may be low, but 100 is rather high.
>>>     > Never use apache2 it has so many problems under load..
>>>
>>>     if you are too supid to configure it yes
>>>
>>> Ever heard about Slow HTTP DoS attack?
>>
>> my config says yes as i heard about many things because it is my daily
>> job
>>
>>     0     0 LOG        tcp  --  eth0   *      !<local-network>/24
>> 0.0.0.0/0            multiport dports
>> 80,443 tcpflags: 0x17/0x02 #conn src/32 > 50 limit: avg 100/hour burst
>> 5 LOG flags 0 level 7 prefix "Firewall
>> Slowloris: "
>>     0     0 DROP       tcp  --  eth0   *      !<local-network>/24
>> 0.0.0.0/0            multiport dports
>> 80,443 tcpflags: 0x17/0x02 #conn src/32 > 50


Attachment: [application/pgp-signature] OpenPGP digital signature signature.asc
Thread
How to change max simultaneous connection parameter in mysql.Kevin Peterson16 Mar
  • Re: How to change max simultaneous connection parameter in mysql.Reindl Harald16 Mar
  • Re: How to change max simultaneous connection parameter in mysql.Manuel Arostegui16 Mar
    • Re: How to change max simultaneous connection parameter in mysql.Igor Shevtsov16 Mar
      • RE: How to change max simultaneous connection parameter in mysql.Rick James18 Mar
        • Re: How to change max simultaneous connection parameter in mysql.Reindl Harald18 Mar
          • RE: How to change max simultaneous connection parameter in mysql.Rick James18 Mar
            • Re: How to change max simultaneous connection parameter in mysql.Reindl Harald18 Mar
              • Re: How to change max simultaneous connection parameter in mysql.Noel Butler18 Mar
              • RE: How to change max simultaneous connection parameter in mysql.Rick James19 Mar
                • Re: How to change max simultaneous connection parameter in mysql.Reindl Harald19 Mar
                • Re: How to change max simultaneous connection parameter in mysql.spameden24 Mar
                  • Re: How to change max simultaneous connection parameter in mysql.Reindl Harald24 Mar
                    • Re: How to change max simultaneous connection parameter in mysql.Manuel Arostegui24 Mar
                    • Re: How to change max simultaneous connection parameter in mysql.spameden2 Apr
                      • Re: How to change max simultaneous connection parameter in mysql.Reindl Harald2 Apr
                        • RE: How to change max simultaneous connection parameter in mysql.Rick James2 Apr
                          • Re: How to change max simultaneous connection parameter in mysql.Reindl Harald2 Apr
                      • RE: How to change max simultaneous connection parameter in mysql.Rick James2 Apr
                        • Re: How to change max simultaneous connection parameter in mysql.Reindl Harald2 Apr
                          • RE: How to change max simultaneous connection parameter in mysql.Rick James2 Apr
                            • Re: How to change max simultaneous connection parameter in mysql.Reindl Harald2 Apr
                            • Re: How to change max simultaneous connection parameter in mysql.spameden2 Apr