473,396 Members | 1,812 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,396 software developers and data experts.

Too many connections MySQL error from PHP

I get this error mysql_pconnect Too many connections ... every now and
then.
Does anyone knows where it comes from ?
There are a lot of sites running on the server and all of them use the
Database frequently.
Is there any configuration that I will have to do to my server in order to
handle the load ?

Thank you...
I would appreciate answers from someone that already experienced that
problem.
Aug 1 '05 #1
4 7200
On 2005-08-01 07:01:04 -0500, "Angelos" <an*****@redcatmedia.net> said:
I get this error mysql_pconnect Too many connections ... every now and then.
Does anyone knows where it comes from ?
There are a lot of sites running on the server and all of them use the
Database frequently.
Is there any configuration that I will have to do to my server in order
to handle the load ?

Thank you...
I would appreciate answers from someone that already experienced that problem.


Could try adding this to your my.cnf:

set-variable=max_connections=250

and restart MySQL, you can raise the number to something higher if needed.

Aug 1 '05 #2
"Angelos" <an*****@redcatmedia.net> wrote in
news:dc**********@nwrdmz02.dmz.ncs.ea.ibs-infra.bt.com:
I get this error mysql_pconnect Too many connections ... every now
and then.
Does anyone knows where it comes from ?


why are you using mysql_pconnect instead of mysql_connect? that's my big
question.

Aug 1 '05 #3

"Good Man" <he***@letsgo.com> wrote in message
news:Xn************************@216.196.97.131...
"Angelos" <an*****@redcatmedia.net> wrote in
news:dc**********@nwrdmz02.dmz.ncs.ea.ibs-infra.bt.com:
I get this error mysql_pconnect Too many connections ... every now
and then.
Does anyone knows where it comes from ?


why are you using mysql_pconnect instead of mysql_connect? that's my big
question.

Yeah thats a good question...
I have just changed that to myqsl_connect
But I still don't understand when to use mysql_pconnect

Thanks anyway
Aug 1 '05 #4
Angelos wrote:
But I still don't understand when to use mysql_pconnect


Read the comments from php-website:
http://www.php.net/manual/fi/functio...l-pconnect.php

"In general use mysql_connect() for connecting to MySQL unless that
connection takes a long time to establish."

So basicly you might need this only if your database is on remote
computer. And when you are forced to use it, you will have to work
around with the problems it might give you.
Aug 1 '05 #5

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

Similar topics

0
by: Eben Goodman | last post by:
I have been getting the following error consistently every few days: Warning: Too many connections in /path/to/connection.php I altered the max_connections in my.cnf to allow for 300...
0
by: Michael | last post by:
I'm running a series of queries from a Python program using the MySQLdb module. The program opens a connection and then procedes to make two queries and then close the connection. It does this for...
0
by: Bill2 | last post by:
Hello, I am having some performance difficulties due to the number of connections getting so high. I know that the correct way to solve this is by using connection pooling, but for now I can't...
1
by: Gregory.Spencer | last post by:
Hi There, Been working in a PHP / MySQL project I took over code development for. Today when testing new changes suddenly started getting "Failed to connect to the database" errors. When...
1
by: Dmitry Davletbaev | last post by:
Hi! I'm working on program that acts as MySQL client. After successful connection program send queries for a long time. When I stop server mysql_query return error (no surprise). But when I...
3
by: Anthony | last post by:
Hey all, Here's a question for you, my hosts have told me that that one my pages, php, was causing their server to reboot because there were too many open connections and that they should be...
4
by: Angelos | last post by:
I get this error mysql_pconnect Too many connections ... every now and then. Does anyone knows where it comes from ? There are a lot of sites running on the server and all of them use the...
37
by: Joshua Ruppert | last post by:
When I'm using FastCGI do I need to code differently than I do when using regular CGI? Because the PHP.exe processes don't go away do global variables stick around from page request to page...
8
by: Pedrissimo | last post by:
Does anyone know how to change the connections.py file in /usr/lib/python2.4/site-packages/MySQLdb/connections.py" to a specific user? The error I get is: _mysql_exceptions.OperationalError:...
13
by: Schmidty | last post by:
If you do a page reload with $_SERVER will your program lose a mysqli connection upon the reload of the page? Would this code work? I need to know how to carry over a connection between methods as...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
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.