UK WEB HOSTING FORUM FOR DISCUSSION ON WEB HOSTING SERVICE AND SUPPORT
LINUX HOSTING WINDOWS HOSTING PACKAGES SHOPPING CART OSCOMMERCE ZEN CART AGORA
ECOMMERCE HOSTING ASP MSSQL FRONTPAGE HOSTING PHP MYSQL HOSTING DISCUSSION FORUM
CPANEL RESELLER HOSTING DEDICATED SERVER VPS HOSTING PLESK VIRTUOZZO
Quick Search
Your forum announcement here!

  UK Web Hosting | Dedicated Server Windows and Linux VPS Forum > Web Hosting and Domains > MySQL Hosting

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 02-04-2007, 23:01
Junior Member
 
Join Date: Feb 2007
Posts: 5
Default Mysql processes sleeping/locked

i have had problems with my mysql service stopping 'randomly'. The support staff said that it was running out of connections. I am recently upgraded to PHP 5/MySQL 5. I have never had this problem before running the same code on PHP 4/MySQL 4

Looking at the 'Show MySQL Processes' section of WHM I see:

+-----+-------+-----------+---------------+---------+-------+-------+------------------+
| Id | User | Host | db | Command | Time | State | Info |
+-----+-------+-----------+---------------+---------+-------+-------+------------------+
| 250 | simon | localhost | simon_ffl0607 | Sleep | 28616 | | |
| 252 | simon | localhost | simon_ffl0607 | Sleep | 28608 | | |
| 254 | simon | localhost | simon_ffl0607 | Sleep | 28635 | | |
| 257 | simon | localhost | simon_ffl0607 | Sleep | 5943 | | |
| 259 | simon | localhost | simon_ffl0607 | Sleep | 28633 | | |
| 261 | simon | localhost | simon_ffl0607 | Sleep | 28628 | | |
| 264 | simon | localhost | simon_ffl0607 | Sleep | 5919 | | |
| 432 | simon | localhost | simon_ffl0607 | Sleep | 5964 | | |
| 844 | root | localhost | | Query | 0 | | show processlist |
+-----+-------+-----------+---------------+---------+-------+-------+------------------+


How do I stop these processes, or more importantly find out how they are getting stuck in the first place?

Thanks!!
Iain
Reply With Quote
  #2 (permalink)  
Old 04-04-2007, 22:47
Member
 
Join Date: Apr 2007
Posts: 61
Default

If they are running out of connections, you may be running too many queries from the same page. Try finding the page(s) that cause the resulting errors, and check the queries inside. It may be that one has a simple typographical error and, as such, is causing a multitude of queries to be sent to the server, maxing out your connections to the database.

Alternatively, I believe that in the MySQL section or phpMyAdmin of cPanel (I'm afraid I can't be more specific as I haven't checked in a long time) you can disconnect users from the databases and close certain connections. The support staff may be able to offer more help here.
Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


All times are GMT. The time now is 03:43.

 

Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
LinkBacks Enabled by Web Hosting 3.1.0
Copyright © 2001-2008, eUKhost.com. All rights reserved.

 
Site Map

knowledgebase articles

popular blog categories