473,394 Members | 1,866 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

Database was unreachable, had to kill over 10 processes, why?

Hello,

I just had an unhappy unincident. I did a spot check on one of my PHP/MySQL
pages and when I tried running the page I got an "Unable to connect to
database" error which is what the PHP code driving the page reports when the
MySQL connect attempt bombs out.

I went into PHPMyAdmin and ran "Show Processes". What I found was over 10
processes still trying to INSERT a record, all with a LOCKED status. I
manually killed every process and as soon as I did that everything started
working again.

Note, my database runs on an external web hosting service that I have an
account with.

What could have caused this situation? It has never happened before. Are
there some extra provisions I can take in my code to prevent or recover from
this?

thx

--

Robert Oschler
"Let the web hear you, add your voice to your web site in minutes!"
-- http://audiodirect.spiderchase.com/
(For a limited time, free voiceover with every sign-up, use this link
instead)
-- http://audio.spiderchase.com/
(A song - are you blue?)
-- http://bluedreams.spiderchase.com/
Jul 19 '05 #1
2 2921
make sure you are not connecting to the database in each loop you might
have. That will spawn a process for each time it loops.

connect outside the loop and the run your queries off the one connection.

if you are already doing this, then post a snip of the mysql code in your
php script
"Robert Oschler" <no_replies@fake_email_address.invalid> wrote in message
news:NQ******************@news2.news.adelphia.net. ..
Hello,

I just had an unhappy unincident. I did a spot check on one of my PHP/MySQL pages and when I tried running the page I got an "Unable to connect to
database" error which is what the PHP code driving the page reports when the MySQL connect attempt bombs out.

I went into PHPMyAdmin and ran "Show Processes". What I found was over 10
processes still trying to INSERT a record, all with a LOCKED status. I
manually killed every process and as soon as I did that everything started
working again.

Note, my database runs on an external web hosting service that I have an
account with.

What could have caused this situation? It has never happened before. Are
there some extra provisions I can take in my code to prevent or recover from this?

thx

--

Robert Oschler
"Let the web hear you, add your voice to your web site in minutes!"
-- http://audiodirect.spiderchase.com/
(For a limited time, free voiceover with every sign-up, use this link
instead)
-- http://audio.spiderchase.com/
(A song - are you blue?)
-- http://bluedreams.spiderchase.com/

Jul 19 '05 #2
make sure you are not connecting to the database in each loop you might
have. That will spawn a process for each time it loops.

connect outside the loop and the run your queries off the one connection.

if you are already doing this, then post a snip of the mysql code in your
php script
"Robert Oschler" <no_replies@fake_email_address.invalid> wrote in message
news:NQ******************@news2.news.adelphia.net. ..
Hello,

I just had an unhappy unincident. I did a spot check on one of my PHP/MySQL pages and when I tried running the page I got an "Unable to connect to
database" error which is what the PHP code driving the page reports when the MySQL connect attempt bombs out.

I went into PHPMyAdmin and ran "Show Processes". What I found was over 10
processes still trying to INSERT a record, all with a LOCKED status. I
manually killed every process and as soon as I did that everything started
working again.

Note, my database runs on an external web hosting service that I have an
account with.

What could have caused this situation? It has never happened before. Are
there some extra provisions I can take in my code to prevent or recover from this?

thx

--

Robert Oschler
"Let the web hear you, add your voice to your web site in minutes!"
-- http://audiodirect.spiderchase.com/
(For a limited time, free voiceover with every sign-up, use this link
instead)
-- http://audio.spiderchase.com/
(A song - are you blue?)
-- http://bluedreams.spiderchase.com/

Jul 19 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: Bob Swerdlow | last post by:
My application starts up a number of processes for various purposes using: self.popen = popen2.Popen3("/usr/local/bin/python -O "myscript.py") and then shuts them down when appropriate with...
0
by: Robert Oschler | last post by:
Hello, I just had an unhappy unincident. I did a spot check on one of my PHP/MySQL pages and when I tried running the page I got an "Unable to connect to database" error which is what the PHP...
5
by: Thomas Chan | last post by:
I have an application that need to launch acrobat reader. But before I open acrobat reader, I want to check there is any existing acrobat reader opening and kill them first. What can I do? Can...
6
by: ujjc001 | last post by:
Hello all. I have many connections that are sleeping. I can right click, kill, up to 2 at a time. It takes about 20 seconds to kill it. Is that normal? I tried to make a stored procedure to...
3
by: pattanawadee | last post by:
Deall All, Could anybody suggestion me How to kill all inherrit processes (sibling child,previous and parent process) in the case I know only child process id and user id, For example I strart...
0
by: Darren Mart via DotNetMonster.com | last post by:
The question: are any user groups besides Administrators permitted to kill processes? Need more info? Happy to oblige: - I'm writing a business object that will run as a service under a...
7
by: Joe | last post by:
If I'm using process.kill, I can only kill processes, which are created in the same login session. (I'm using win2000, I'm in the local admin group) Processes created by me in earlier logins or...
13
by: Christopher Cashell | last post by:
Yesterday, while attempting to access a database, I received errors saying that the database was innaccessible. After investigating a little, I found the following in the PostgreSQL log files: ...
11
by: zgh1970 | last post by:
Hi, Friends, I need to know how to stop all database process even after db2stop. How can I stop all database processes? I have finished upgraded our system test and UAT region from 32-bit to...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.