473,748 Members | 2,615 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 7210
On 2005-08-01 07:01:04 -0500, "Angelos" <an*****@redcat media.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_co nnections=250

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

Aug 1 '05 #2
"Angelos" <an*****@redcat media.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.c om> wrote in message
news:Xn******** *************** *@216.196.97.13 1...
"Angelos" <an*****@redcat media.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
2539
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 connections. I am not using persistent connections with php. I used to use them but got this too many connections error all the time, so I switched to non-persistent connections, but they don't seem to be getting killed off? I am using php to connect.
0
7386
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 each file provided as an argument to the program so there can be quite a few such cycles. I'm getting an 1040 error of 'Too many connections'. I can't figure out how this program would ever have more than one connection open at a time. Could...
0
1266
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 figure out why the connections are'nt being released as I expect. I am using Tomcat 4.0, with mm.mysql-2.0.14-bin.jar on Linux 7.2 to connect to a MySQL max 3.23.51 database. I open the connections in a bean with:
1
2216
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 logged into phpmyadmin it said: Error
1
1796
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 start server my program recieve information again without connection reinitialization. I suppose MySQL server track connections somehow but I didn't find any info about it in documentation. Can somebody point me to docs or explain this behaviour?
3
2235
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 closed. Now, correct me if I am wrong but I thought that the connections were closed after a minute of inactivity. Does this sound right? Could open connections cause their server to reboot a
4
4179
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 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
37
3981
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 request, creating the need for better managment / pooling of DB connections? Josh
8
9351
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: (1045, "Access denied for user 'root'@'localhost' (using password: NO)") Attrched is the begiining of the file: """
13
3716
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 I am new to OOP? Thanks... Example; ======================================== <?php // webpage $newsignon = new newuser(); logon();
0
8996
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8832
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9386
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
9333
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9254
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8255
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
4879
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
2791
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2217
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.