You are here: max_user_connection, when is it a bad script and when is it a busy server. « All PHP « IT news, forums, messages
max_user_connection, when is it a bad script and when is it a busy server.

Posted by FFMG on 10/16/06 08:21

First I should point out, that 99.99% of the time I have no problems
with my server.
Yes, it is semi busy but nothing that should bring MySQL server down. I
get on average 70 to 100 queries a seconds.

My understanding of max_user_connection is that it is the number of
scripts that simultaneously request a connection, (before the script
ends).
If there is a bug in the script, such as an infinite loop then
connection will be kept until the timeout occurs.

Seen that my server works fine most of the time, I can assume that such
a bug is pretty rare difficult to reproduce. So how can I can it reach
the max number connection?

So my question is, is there a log that keeps track of scripts that took
a long time to run?
I guess anything taking more than 3 seconds should be counted as slow.
A script should never take more than one or two seconds to execute,
(should it?).

And from a database point of view, is there a way of setting a time
out? If the query does not return within 1 or 2 seconds then there is a
problem and it should exit.

And last but not least, Is there a command I my script can send to
flush all the connections regardless of who/what is using it?
Because when that happens then I have to wait a very long time for the
server to recover.

Any thoughts?

FFMG

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация