Advertisement

06.03.2007 at 09:22PM PDT, ID: 22610326
[x]
Attachment Details
[x]
The Solution Rating System

With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.

  • The Grade of the Solution
  • The Zone Rank of the Expert Providing the Solution
  • The Number of Author and Expert Comments
  • The Number of Experts Contributing
  • The Feedback of the Community

Your Input Matters
Because of the way the system is set up, the most important variable in this equation is you. As a member of Experts Exchange, you are able to cast your vote on the quality of the solutions in regard to how complete, accurate, helpful and easy to understand each solution is. When you provide your feedback, each rating is adjusted accordingly. So, if you see a solution that has a poor rating that you think is a good solution, let us know by rating it. As you do, the rating will be adjusted and will become more accurate for other members of our site.

If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support.

Thank you!

7.2

40% mysql connection fail rate, help need to fix problem

Asked by cainesk in MySQL Server, Databases Miscellaneous, PHP and Databases

Tags: , ,

Hi, I have a database server and i'm getting a lot of failed connection attempts when users are using my site.  
I need help badly :)  My tables all have primary keys and my queries uses them or at least an index so i have fairly optimized queries.  The site gets about 8000-9000 members online at round the same time so I'm not sure if it's too much for the db.  No matter what changes i try in the my.cnf the Max used connections is always around 1033 but that max is reached well before peak times as when peak times comes it doesn't go higher so i end up with a lot of failed connections.   Below are some data I figured would come in handy  this is from having the database online for just 3 hours:

8 gigs Ram
Dual Xeon processor

Failed attempts          115,612          29,718.19          40.20 %
 Aborted         290,468         74,665.11         100.99 %
 Total         287,624         73,934.05         100.00 %

Total          ø per hour          ø per minute          ø per second
 24,844,858         6,386,396.92         106,439.95         1,774.00

Max used connections          1082

 Open tables          5000
 Open files         5229
 Open streams         0
 Opened tables         7584
 Created tmp disk tables          703
 Created tmp tables         976483
 Created tmp files         55
Threads cached          61
 Threads created         120944
 Threads connected         1021
 Threads running         22
 Handler read rnd          28188883
 Handler read rnd next         193420205
 Key read requests          619785900
Key reads          415910
 Qcache queries in cache          27279
 Qcache inserts         12854166
 Qcache hits         5461364
 Qcache lowmem prunes         22137
 Qcache not cached         370565
 Qcache free memory         72573336
 Qcache free blocks         20215
 Qcache total blocks         74930
 Slow queries          5062
 Sort merge passes         26
 Sort range         923143
 Sort rows         64210638
 Sort scan         621404
 Table locks immediate         14692036
 Table locks waited         2122146
My.cnf
-------datadir=/var/lib/mysql
socket=/var/lib/mysql/mysql.sock
set-variable = max_connections=2500
set-variable = interactive_timeout=30
set-variable = wait_timeout=15
set-variable = thread_cache_size=256
set-variable = connect_timeout=30
set-variable = key_buffer=256M
set-variable = join_buffer=1M
set-variable = record_buffer=512k
set-variable = sort_buffer=1M
set-variable = table_cache=5000
set-variable = thread_concurrency=4
set-variable = tmp_table_size=16M
set-variable = query_cache_type=1
set-variable = query_cache_limit=1M
set-variable = query_cache_size=100M
set-variable = max_allowed_packet=2M
set-variable = max_connect_errors=250
set-variable = max_user_connections=2500
log-slow-queries = /var/log/mysql/mysql-slow.log
long_query_time = 5


[mysql.server]
user=mysql
basedir=/var/lib

thanks for the assistance in advance.
Start Free Trial
 
 
[+][-]06.04.2007 at 03:26AM PDT, ID: 19207335

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zones: MySQL Server, Databases Miscellaneous, PHP and Databases
Tags: connect, mysql, slow
Sign Up Now!
Solution Provided By: ingwa
Participating Experts: 2
Solution Grade: A
 
 
[+][-]06.04.2007 at 06:10AM PDT, ID: 19208138

Assisted solutions are selected by the member who asked the question as a comment that contributed to their question's solution.

Start your 7-day free trial to view this Assisted Solution or ask the Experts your question.

 
[+][-]06.04.2007 at 12:55PM PDT, ID: 19211439

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]06.04.2007 at 01:05PM PDT, ID: 19211521

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]06.04.2007 at 01:32PM PDT, ID: 19211773

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]06.04.2007 at 01:33PM PDT, ID: 19211775

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]09.02.2008 at 03:01PM PDT, ID: 22372167

Experts Exchange has a courteous staff of administrators who help members get the most out of the website by means of administrative comments like this one.

Start your 7-day free trial to view this Administrative Comment or ask the Experts your question.

 
[+][-]09.08.2008 at 04:41PM PDT, ID: 22422647

Experts Exchange has a courteous staff of administrators who help members get the most out of the website by means of administrative comments like this one.

Start your 7-day free trial to view this Administrative Comment or ask the Experts your question.

 
 
Loading Advertisement...
20081112-EE-VQP-42