Re: How to change max simultaneous connection parameter in mysql.

2013-04-02 Thread spameden
2013/3/24 Reindl Harald h.rei...@thelounge.net



 Am 24.03.2013 05:20, schrieb spameden:
  2013/3/19 Rick James rja...@yahoo-inc.com:
  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.



  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?



  The best combo is php5-fpm+nginx.
  Handles loads of users at once if well tuned

 Apache 2.4 handles the load of 600 parallel executed
 php-scripts from our own CMS-system


Nginx serves static content way better than apache2 (did few benchmarks
already).

nginx+php5-fpm handles better load than apache2-prefork+mod_php

you can google benchmarks if you dont trust me

also nginx eats much less memory than apache2

php5-fpm can be tuned as well to suit your needs if you have lots of
dynamic content


 maybe you guys should learn what a opcode-cache is and
 how to compile and optimize software (binaries and config)

 o'rly?


Re: How to change max simultaneous connection parameter in mysql.

2013-04-02 Thread Reindl Harald


Am 02.04.2013 16:09, schrieb spameden:
 2013/3/24 Reindl Harald h.rei...@thelounge.net 
 mailto:h.rei...@thelounge.net

 Am 24.03.2013 05:20, schrieb spameden:
  2013/3/19 Rick James rja...@yahoo-inc.com 
 mailto:rja...@yahoo-inc.com:
  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 LOGtcp  --  eth0   *  !local-network/24  
0.0.0.0/0multiport 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/0multiport dports
80,443 tcpflags: 0x17/0x02 #conn src/32  50



signature.asc
Description: OpenPGP digital signature


Please Help. selectcol_arrayref problem

2013-04-02 Thread Richard Reina
use DBI;
my $dbh = DBI-connect( DBI:mysql:rushload;192.168.0.1, $usrr, $passw, {
RaiseError = 3 } );
my $dbs = $dbh-selectcol_arrayref(show databases);

#my $dsn = dbi:mysql:information_schema:192.168.0.1:3306;
#my $dbh = DBI-connect($dsn, $usrr, $passw);

my $dbs = $dbh-selectcol_arrayref('show databases');

print @$dbs\n;

When I query the server for a list of databases with the code above it
returns the name of just two and there are over 10.

Any ideas?

Thanks


Re: Please Help. selectcol_arrayref problem

2013-04-02 Thread Richard Reina
I did a GRANT REPLICATION SLAVE ON *.* TO 'user'@'192.168.0.23' IDENTIFIED
BY 'psswd';

on the master. Doesn't *.* mean everything? Why would it just show me to
databases?






2013/4/2 Larry Martell larry.mart...@gmail.com

 On Tue, Apr 2, 2013 at 11:30 AM, Richard Reina gatorre...@gmail.com
 wrote:
  use DBI;
  my $dbh = DBI-connect( DBI:mysql:rushload;192.168.0.1, $usrr, $passw,
 {
  RaiseError = 3 } );
  my $dbs = $dbh-selectcol_arrayref(show databases);
 
  #my $dsn = dbi:mysql:information_schema:192.168.0.1:3306;
  #my $dbh = DBI-connect($dsn, $usrr, $passw);
 
  my $dbs = $dbh-selectcol_arrayref('show databases');
 
  print @$dbs\n;
 
  When I query the server for a list of databases with the code above it
  returns the name of just two and there are over 10.
 
  Any ideas?

 Permissions - the user you're logging in as probably only has
 permission to see the 2 that are being returned.



Re: Please Help. selectcol_arrayref problem

2013-04-02 Thread Larry Martell
On Tue, Apr 2, 2013 at 11:30 AM, Richard Reina gatorre...@gmail.com wrote:
 use DBI;
 my $dbh = DBI-connect( DBI:mysql:rushload;192.168.0.1, $usrr, $passw, {
 RaiseError = 3 } );
 my $dbs = $dbh-selectcol_arrayref(show databases);

 #my $dsn = dbi:mysql:information_schema:192.168.0.1:3306;
 #my $dbh = DBI-connect($dsn, $usrr, $passw);

 my $dbs = $dbh-selectcol_arrayref('show databases');

 print @$dbs\n;

 When I query the server for a list of databases with the code above it
 returns the name of just two and there are over 10.

 Any ideas?

Permissions - the user you're logging in as probably only has
permission to see the 2 that are being returned.

-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/mysql



Re: Please Help. selectcol_arrayref problem

2013-04-02 Thread Stillman, Benjamin
Nope. That's just granting replication privileges so it can read updates
on all tables on all databases. It cannot select anything.

Why are you trying to connect with a replication slave user?







On 4/2/13 1:47 PM, Richard Reina gatorre...@gmail.com wrote:

I did a GRANT REPLICATION SLAVE ON *.* TO 'user'@'192.168.0.23'
IDENTIFIED
BY 'psswd';

on the master. Doesn't *.* mean everything? Why would it just show me to
databases?






2013/4/2 Larry Martell larry.mart...@gmail.com

 On Tue, Apr 2, 2013 at 11:30 AM, Richard Reina gatorre...@gmail.com
 wrote:
  use DBI;
  my $dbh = DBI-connect( DBI:mysql:rushload;192.168.0.1, $usrr,
$passw,
 {
  RaiseError = 3 } );
  my $dbs = $dbh-selectcol_arrayref(show databases);
 
  #my $dsn = dbi:mysql:information_schema:192.168.0.1:3306;
  #my $dbh = DBI-connect($dsn, $usrr, $passw);
 
  my $dbs = $dbh-selectcol_arrayref('show databases');
 
  print @$dbs\n;
 
  When I query the server for a list of databases with the code above it
  returns the name of just two and there are over 10.
 
  Any ideas?

 Permissions - the user you're logging in as probably only has
 permission to see the 2 that are being returned.





Notice: This communication may contain privileged and/or confidential 
information. If you are not the intended recipient, please notify the sender by 
email, and immediately delete the message and any attachments without copying 
or disclosing them. LBI may, for any reason, intercept, access, use, and 
disclose any information that is communicated by or through, or which is stored 
on, its networks, applications, services, and devices.

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/mysql



Re: How to change max simultaneous connection parameter in mysql.

2013-04-02 Thread Reindl Harald


Am 02.04.2013 22:56, schrieb Rick James:
 I hear that nginx is very fast for a certain class of web serving.  

yes

 But what happens if a web page needs to do a SELECT?  

what should happen?

 Is nginx single-threaded, thereby sitting idle waiting for the SELECT? 

why should it do that?

 And, should you run 8 nginx web servers on an 8-core box?

why should you do that?

http://en.wikipedia.org/wiki/Nginx
nginx uses an asynchronous event-driven approach to handling requests

 -Original Message-
 From: spameden [mailto:spame...@gmail.com]
 Sent: Tuesday, April 02, 2013 7:10 AM
 To: Reindl Harald
 Cc: mysql@lists.mysql.com
 Subject: Re: How to change max simultaneous connection parameter in
 mysql.

 2013/3/24 Reindl Harald h.rei...@thelounge.net



 Am 24.03.2013 05:20, schrieb spameden:
 2013/3/19 Rick James rja...@yahoo-inc.com:
 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.



 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?



 The best combo is php5-fpm+nginx.
 Handles loads of users at once if well tuned

 Apache 2.4 handles the load of 600 parallel executed php-scripts from
 our own CMS-system


 Nginx serves static content way better than apache2 (did few benchmarks
 already).

 nginx+php5-fpm handles better load than apache2-prefork+mod_php

 you can google benchmarks if you dont trust me

 also nginx eats much less memory than apache2

 php5-fpm can be tuned as well to suit your needs if you have lots of
 dynamic content


 maybe you guys should learn what a opcode-cache is and how to compile
 and optimize software (binaries and config)

 o'rly?



signature.asc
Description: OpenPGP digital signature


RE: How to change max simultaneous connection parameter in mysql.

2013-04-02 Thread 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...

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.

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.

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; this probably leads 
to broken web pages, maybe even 404s or 500s.  Granted, you have (at least) 3 
choices: decrease MaxClients, increase max_connections, or add more Slaves.  If 
mysql has most of max_connections _actively_ running querieds, then it is 
probably stumbling badly, so I vote against increasing that.  Adding a Slave 
cannot be done 'instantly'.  That leaves decreasing MaxClients, which is quick 
and easy.  Furthermore, the SE (in one of the meltdowns) killed Apache; this 
led to a prompt clear up of all the issues -- poor web response, mysql melting 
down, etc.

Sometimes less is better!

 -Original Message-
 From: Reindl Harald [mailto:h.rei...@thelounge.net]
 Sent: Tuesday, April 02, 2013 8:29 AM
 To: mysql@lists.mysql.com
 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.rei...@thelounge.net
  mailto:h.rei...@thelounge.net
 
  Am 24.03.2013 05:20, schrieb spameden:
   2013/3/19 Rick James rja...@yahoo-inc.com
 mailto:rja...@yahoo-inc.com:
   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 LOGtcp  --  eth0   *  !local-network/24
 0.0.0.0/0multiport 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/0multiport dports
 80,443 tcpflags: 0x17/0x02 #conn src/32  50


--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/mysql



Re: How to change max simultaneous connection parameter in mysql.

2013-04-02 Thread Reindl Harald


Am 02.04.2013 23:15, schrieb Rick James:
 SELECT is not performed in the same thread as nginx; it is performed in 
 another process, or even (in big web setups) in a different host.  Therefore, 
 nginx would be in some form of wait state, thereby not really using the CPU.

tell me something new

 -Original Message-
 From: Reindl Harald [mailto:h.rei...@thelounge.net]
 Sent: Tuesday, April 02, 2013 2:00 PM
 To: mysql@lists.mysql.com
 Subject: Re: How to change max simultaneous connection parameter in
 mysql.



 Am 02.04.2013 22:56, schrieb Rick James:
 I hear that nginx is very fast for a certain class of web serving.

 yes

 But what happens if a web page needs to do a SELECT?

 what should happen?

 Is nginx single-threaded, thereby sitting idle waiting for the
 SELECT?

 why should it do that?

 And, should you run 8 nginx web servers on an 8-core box?

 why should you do that?

 http://en.wikipedia.org/wiki/Nginx
 nginx uses an asynchronous event-driven approach to handling requests

 -Original Message-
 From: spameden [mailto:spame...@gmail.com]
 Sent: Tuesday, April 02, 2013 7:10 AM
 To: Reindl Harald
 Cc: mysql@lists.mysql.com
 Subject: Re: How to change max simultaneous connection parameter in
 mysql.

 2013/3/24 Reindl Harald h.rei...@thelounge.net



 Am 24.03.2013 05:20, schrieb spameden:
 2013/3/19 Rick James rja...@yahoo-inc.com:
 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.



 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?



 The best combo is php5-fpm+nginx.
 Handles loads of users at once if well tuned

 Apache 2.4 handles the load of 600 parallel executed php-scripts
 from our own CMS-system


 Nginx serves static content way better than apache2 (did few
 benchmarks already).

 nginx+php5-fpm handles better load than apache2-prefork+mod_php

 you can google benchmarks if you dont trust me

 also nginx eats much less memory than apache2

 php5-fpm can be tuned as well to suit your needs if you have lots of
 dynamic content


 maybe you guys should learn what a opcode-cache is and how to
 compile and optimize software (binaries and config)

 o'rly?



signature.asc
Description: OpenPGP digital signature


RE: How to change max simultaneous connection parameter in mysql.

2013-04-02 Thread Rick James
SELECT is not performed in the same thread as nginx; it is performed in another 
process, or even (in big web setups) in a different host.  Therefore, nginx 
would be in some form of wait state, thereby not really using the CPU.

 -Original Message-
 From: Reindl Harald [mailto:h.rei...@thelounge.net]
 Sent: Tuesday, April 02, 2013 2:00 PM
 To: mysql@lists.mysql.com
 Subject: Re: How to change max simultaneous connection parameter in
 mysql.
 
 
 
 Am 02.04.2013 22:56, schrieb Rick James:
  I hear that nginx is very fast for a certain class of web serving.
 
 yes
 
  But what happens if a web page needs to do a SELECT?
 
 what should happen?
 
  Is nginx single-threaded, thereby sitting idle waiting for the
 SELECT?
 
 why should it do that?
 
  And, should you run 8 nginx web servers on an 8-core box?
 
 why should you do that?
 
 http://en.wikipedia.org/wiki/Nginx
 nginx uses an asynchronous event-driven approach to handling requests
 
  -Original Message-
  From: spameden [mailto:spame...@gmail.com]
  Sent: Tuesday, April 02, 2013 7:10 AM
  To: Reindl Harald
  Cc: mysql@lists.mysql.com
  Subject: Re: How to change max simultaneous connection parameter in
  mysql.
 
  2013/3/24 Reindl Harald h.rei...@thelounge.net
 
 
 
  Am 24.03.2013 05:20, schrieb spameden:
  2013/3/19 Rick James rja...@yahoo-inc.com:
  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.
 
 
 
  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?
 
 
 
  The best combo is php5-fpm+nginx.
  Handles loads of users at once if well tuned
 
  Apache 2.4 handles the load of 600 parallel executed php-scripts
  from our own CMS-system
 
 
  Nginx serves static content way better than apache2 (did few
  benchmarks already).
 
  nginx+php5-fpm handles better load than apache2-prefork+mod_php
 
  you can google benchmarks if you dont trust me
 
  also nginx eats much less memory than apache2
 
  php5-fpm can be tuned as well to suit your needs if you have lots of
  dynamic content
 
 
  maybe you guys should learn what a opcode-cache is and how to
  compile and optimize software (binaries and config)
 
  o'rly?


--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/mysql



RE: How to change max simultaneous connection parameter in mysql.

2013-04-02 Thread Rick James
I hear that nginx is very fast for a certain class of web serving.  But what 
happens if a web page needs to do a SELECT?  Is nginx single-threaded, thereby 
sitting idle waiting for the SELECT?  And, should you run 8 nginx web servers 
on an 8-core box?

 -Original Message-
 From: spameden [mailto:spame...@gmail.com]
 Sent: Tuesday, April 02, 2013 7:10 AM
 To: Reindl Harald
 Cc: mysql@lists.mysql.com
 Subject: Re: How to change max simultaneous connection parameter in
 mysql.
 
 2013/3/24 Reindl Harald h.rei...@thelounge.net
 
 
 
  Am 24.03.2013 05:20, schrieb spameden:
   2013/3/19 Rick James rja...@yahoo-inc.com:
   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.
 
 
 
   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?
 
 
 
   The best combo is php5-fpm+nginx.
   Handles loads of users at once if well tuned
 
  Apache 2.4 handles the load of 600 parallel executed php-scripts from
  our own CMS-system
 
 
 Nginx serves static content way better than apache2 (did few benchmarks
 already).
 
 nginx+php5-fpm handles better load than apache2-prefork+mod_php
 
 you can google benchmarks if you dont trust me
 
 also nginx eats much less memory than apache2
 
 php5-fpm can be tuned as well to suit your needs if you have lots of
 dynamic content
 
 
  maybe you guys should learn what a opcode-cache is and how to compile
  and optimize software (binaries and config)
 
  o'rly?

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/mysql



Re: How to change max simultaneous connection parameter in mysql.

2013-04-02 Thread spameden
2013/4/3 Rick James rja...@yahoo-inc.com

 SELECT is not performed in the same thread as nginx; it is performed in
 another process, or even (in big web setups) in a different host.
  Therefore, nginx would be in some form of wait state, thereby not really
 using the CPU.


ofc select is not performed in nginx thread, nginx acts as a proxying
server and just passes the request to the backend

it's entirely depends on your backend how fast it's gonna process certain
SELECT and ofc depends on what kind of database you've got

if backend takes too long to respond nginx just shows 502 error with
timeout from backend (by default: 30s).

good practice is to have multiple backends behind load balancer, so under
huge load no single request would be lost.



  -Original Message-
  From: Reindl Harald [mailto:h.rei...@thelounge.net]
  Sent: Tuesday, April 02, 2013 2:00 PM
  To: mysql@lists.mysql.com
  Subject: Re: How to change max simultaneous connection parameter in
  mysql.
 
 
 
  Am 02.04.2013 22:56, schrieb Rick James:
   I hear that nginx is very fast for a certain class of web serving.
 
  yes
 
   But what happens if a web page needs to do a SELECT?
 
  what should happen?
 
   Is nginx single-threaded, thereby sitting idle waiting for the
  SELECT?


nginx is multi threaded and it supports SMP architecture, there is main
process which controls everything and nginx configuration can be reloaded
with zero downtime.

I saw multiple test where under load (simple DDoS simulation attack like
there where 40k bots hitting the site at once) nginx+php5-fpm dropped much
less requests than apache2 + mod_php.

apache2 is so bad at eating memory and system resources.


 
  why should it do that?
 
   And, should you run 8 nginx web servers on an 8-core box?


no, you just tune

worker_processes 8;


  why should you do that?
 
  http://en.wikipedia.org/wiki/Nginx
  nginx uses an asynchronous event-driven approach to handling requests
 
   -Original Message-
   From: spameden [mailto:spame...@gmail.com]
   Sent: Tuesday, April 02, 2013 7:10 AM
   To: Reindl Harald
   Cc: mysql@lists.mysql.com
   Subject: Re: How to change max simultaneous connection parameter in
   mysql.
  
   2013/3/24 Reindl Harald h.rei...@thelounge.net
  
  
  
   Am 24.03.2013 05:20, schrieb spameden:
   2013/3/19 Rick James rja...@yahoo-inc.com:
   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.
  
  
  
   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?
  
  
  
   The best combo is php5-fpm+nginx.
   Handles loads of users at once if well tuned
  
   Apache 2.4 handles the load of 600 parallel executed php-scripts
   from our own CMS-system
  
  
   Nginx serves static content way better than apache2 (did few
   benchmarks already).
  
   nginx+php5-fpm handles better load than apache2-prefork+mod_php
  
   you can google benchmarks if you dont trust me
  
   also nginx eats much less memory than apache2
  
   php5-fpm can be tuned as well to suit your needs if you have lots of
   dynamic content
  
  
   maybe you guys should learn what a opcode-cache is and how to
   compile and optimize software (binaries and config)
  
   o'rly?


 --
 MySQL General Mailing List
 For list archives: http://lists.mysql.com/mysql
 To unsubscribe:http://lists.mysql.com/mysql




Re: All client commands to syslog?

2013-04-02 Thread spameden
2013/3/28 RafaƂ Radecki radecki.ra...@gmail.com

 Hi All.

 I have a production setup of four databases connected with
 replication. I would like to log every command that clients execute
 for auditing.


Take a look at general  query log it's exactly what you need.

http://dev.mysql.com/doc/refman/5.5/en/query-log.html



 I've read
 http://www.percona.com/doc/percona-server/5.5/diagnostics/mysql_syslog.html?id=percona-server:features:mysql_syslogredirect=1#client-variables
 but despite the fact that I use percona
 Percona-Server-server-55-5.5.28-rel29.3.388.rhel6.x86_64 it does not
 seem to work. I've added syslog/syslog ON to my my.cnf server
 configuration file but no info about executed commands in logs.

 I've also read
 http://www.mysqlperformanceblog.com/2008/07/08/logging-your-mysql-command-line-client-sessions/
 .

 What is the best way to log all client commands?

 Best regards,
 Rafal.

 --
 MySQL General Mailing List
 For list archives: http://lists.mysql.com/mysql
 To unsubscribe:http://lists.mysql.com/mysql




Re: How to change max simultaneous connection parameter in mysql.

2013-04-02 Thread Reindl Harald


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.rei...@thelounge.net]
 Sent: Tuesday, April 02, 2013 8:29 AM
 To: mysql@lists.mysql.com
 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.rei...@thelounge.net
 mailto:h.rei...@thelounge.net

 Am 24.03.2013 05:20, schrieb spameden:
  2013/3/19 Rick James rja...@yahoo-inc.com
 mailto:rja...@yahoo-inc.com:
  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 LOGtcp  --  eth0   *  !local-network/24
 0.0.0.0/0multiport 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/0multiport dports
 80,443 tcpflags: 0x17/0x02 #conn src/32  50



signature.asc
Description: OpenPGP digital signature