[PHP-DB] too many connections?

2003-01-27 Thread Addison Ellis
hello and thank you.
	any idea what this means? i have not touched or changed my 
config.php file since i put it up the first time... it contains my db 
connect info. also, i just downloaded it from the server to see if it 
had been modified and it had not. thanks again and best, addison

Warning: Too many connections in 
/users/infoserv/web/register/ca/admin/config.php on line 5

Warning: MySQL Connection Failed: Too many connections in 
/users/infoserv/web/register/ca/admin/config.php on line 5
--
Addison Ellis
small independent publishing co.
114 B 29th Avenue North
Nashville, TN 37203
(615) 321-1791
[EMAIL PROTECTED]
[EMAIL PROTECTED]
subsidiaries of small independent publishing co.
[EMAIL PROTECTED]
[EMAIL PROTECTED]

Re: [PHP-DB] too many connections?

2003-01-27 Thread John Krewson

This would make a whole lot more sense within a context...such as how 
busy is your application, what kind of connection you are using 
(pconnect vs. connect) and so on.

A quick search on MySQL's web site resulted in:

http://www.mysql.com/doc/en/Too_many_connections.html

Be sure to check out general messages in the mailing list archives as 
well and Google.

Good luck.


Addison Ellis wrote:

hello and thank you.
any idea what this means? i have not touched or changed my
config.php file since i put it up the first time... it contains my db
connect info. also, i just downloaded it from the server to see if it
had been modified and it had not. thanks again and best, addison

Warning: Too many connections in
/users/infoserv/web/register/ca/admin/config.php on line 5

Warning: MySQL Connection Failed: Too many connections in
/users/infoserv/web/register/ca/admin/config.php on line 5



--
John Krewson
Programmer - SWORPS


--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP-DB] too many connections?

2003-01-27 Thread 1LT John W. Holmes
 any idea what this means? i have not touched or changed my
 config.php file since i put it up the first time... it contains my db
 connect info. also, i just downloaded it from the server to see if it
 had been modified and it had not. thanks again and best, addison

 Warning: Too many connections in
 /users/infoserv/web/register/ca/admin/config.php on line 5

 Warning: MySQL Connection Failed: Too many connections in
 /users/infoserv/web/register/ca/admin/config.php on line 5

It's exactly what it say, there are too many connections to your MySQL
server. By default, you can have 100 connections to a MySQL server. If you
have a ton of traffic, you will need to increase that limit so that you
don't get errors like this. If you don't have enough traffic to generate 100
connections at the same time, then run a SHOW PROCESSLIST on your MySQL
server to see if you have a query locking things up and everything else is
waiting (did this the other day, oops!)

---John Holmes...


-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP-DB] resolved : Re: [PHP-DB] too many connections?

2003-01-27 Thread Addison Ellis
i searched at mysql.com and it said basically what you are asking. i 
contacted the server admin and they are going to re-set the server. 
thank you for your time. best regards, addison


Assuming that line 5 is the dbconnect, is there a limit on the number of
connections that your MySQL server allows? Is there a limit set in
php.ini?


Shannon Johnston

On Mon, 2003-01-27 at 15:13, Addison Ellis wrote:

 hello and thank you.
	any idea what this means? i have not touched or changed my
 config.php file since i put it up the first time... it contains my db
 connect info. also, i just downloaded it from the server to see if it
 had been modified and it had not. thanks again and best, addison

 Warning: Too many connections in
 /users/infoserv/web/register/ca/admin/config.php on line 5

 Warning: MySQL Connection Failed: Too many connections in
 /users/infoserv/web/register/ca/admin/config.php on line 5

--
Shannon Johnston [EMAIL PROTECTED]


--
Addison Ellis
small independent publishing co.
114 B 29th Avenue North
Nashville, TN 37203
(615) 321-1791
[EMAIL PROTECTED]
[EMAIL PROTECTED]
subsidiaries of small independent publishing co.
[EMAIL PROTECTED]
[EMAIL PROTECTED]

--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP-DB] TOO MANY CONNECTIONS!!

2002-10-25 Thread Peter Beckman
You can also do something like this:

if ($db_link = mysql_pconnect($host, $user, $pass)) {
if (mysql_select_db($db,$db_link)) { return $db_link; }
else die(MySQL Error: Cannot select {$db} database using {$user}@{$host}: 
.mysql_error());
} else die(MySQL Error: Cannot connect to {$db}: .mysql_error());

make $db_link global (if you use this in a function) then you can know that
you are connected if your script is still running.

If you make two connections, just make db_link something different for the
other connection, and do this:

$x = mysql_query(Select * from users,$db_link);

That will force PHP to use the $db_link specified instead of the last
opened connection.

Peter

On Fri, 25 Oct 2002, dr. Agon wrote:

 Helo,

 why you don't make some kind of db_connect.php which will make mysql_pconnect() 
and include it in top of your first script? You then will be able use mysql query in 
everyone of your page. You can also make $mysql_is_connected=true; there and check 
that variable in other scrips if need to be sure that this file was already included.

 --
 Regards, A.K.

 Georgie Casey [EMAIL PROTECTED] wrote in message 
news:20021024201835.36082.qmail;pb1.pair.com...
  Yeah, sometimes I open and close 2 or 3 permanent connections in one page. I
  knida have to as each page is made up of a few different include files, and
  if I dont do seperate connections, it mightnt work.
 
  I'll recode my site to cache everything except search pages, or can I even
  cache these as well??
  Duncan Hill [EMAIL PROTECTED] wrote in message
  news:20021023222841.GD30375;bajan.cricalix.net...
   On Wed, Oct 23, 2002 at 10:18:07PM +0100, Georgie Casey wrote:
Im getting a too many connections error in my PHP pages at
http://www.free-ringtones.tv. I presume this is from the MySQL server,
  and I
know I access the database a lot for each page. So whats the solution to
  
   MySQL has a default of either 50 or 100 concurrent connections.  Exceed it
   and you'll get that error.  That parameter is configurable - if you run
  the
   MySQL daemon itself.  If you use shared hosting, you may not be able to
   tweak it.
  
   Do the pages -need- to be totally dynamic, or can you use the caching
  system
   you mentioned?  If so, then wrap code that stats an HTML page for the
  time,
   and if it's too old, update it.  Be sure to use file locking so you don't
   clobber yourself.
  
   Moreover, do you open one connection and re-use it in a page, or do you do
   multiple opens and closes?
 
 
 
  --
  PHP Database Mailing List (http://www.php.net/)
  To unsubscribe, visit: http://www.php.net/unsub.php
 


---
Peter BeckmanSystems Engineer, Fairfax Cable Access Corporation
[EMAIL PROTECTED] http://www.purplecow.com/
---


-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP-DB] TOO MANY CONNECTIONS!!

2002-10-24 Thread Micah Stevens
Just open one connection. It'll work fine for multiple queries across 
several include files. I have a project right now that uses about 5 
different include files at any one time, and 1 connection works great. Also 
keeping only one connection alive will speed up the script.

-Micah


At 09:14 PM 10/24/2002 +0100, Georgie Casey wrote:
Yeah, sometimes I open and close 2 or 3 permanent connections in one page. I
knida have to as each page is made up of a few different include files, and
if I dont do seperate connections, it mightnt work.

I'll recode my site to cache everything except search pages, or can I even
cache these as well??
Duncan Hill [EMAIL PROTECTED] wrote in message
news:20021023222841.GD30375;bajan.cricalix.net...
 On Wed, Oct 23, 2002 at 10:18:07PM +0100, Georgie Casey wrote:
  Im getting a too many connections error in my PHP pages at
  http://www.free-ringtones.tv. I presume this is from the MySQL server,
and I
  know I access the database a lot for each page. So whats the solution to

 MySQL has a default of either 50 or 100 concurrent connections.  Exceed it
 and you'll get that error.  That parameter is configurable - if you run
the
 MySQL daemon itself.  If you use shared hosting, you may not be able to
 tweak it.

 Do the pages -need- to be totally dynamic, or can you use the caching
system
 you mentioned?  If so, then wrap code that stats an HTML page for the
time,
 and if it's too old, update it.  Be sure to use file locking so you don't
 clobber yourself.

 Moreover, do you open one connection and re-use it in a page, or do you do
 multiple opens and closes?



--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-DB] TOO MANY CONNECTIONS!!

2002-10-23 Thread Georgie Casey
Im getting a too many connections error in my PHP pages at
http://www.free-ringtones.tv. I presume this is from the MySQL server, and I
know I access the database a lot for each page. So whats the solution to
this?? Write scripts that create static html pages that update every 20
minutes or so??

And was it the host that limited my connections???

TIA



-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP-DB] TOO MANY CONNECTIONS!!

2002-10-23 Thread Micah Stevens
Send me the code around the lines that are giving errors.. Doesn't look 
like a MySQL error to me.

-Micah


At 10:18 PM 10/23/2002 +0100, Georgie Casey wrote:
Im getting a too many connections error in my PHP pages at
http://www.free-ringtones.tv. I presume this is from the MySQL server, and I
know I access the database a lot for each page. So whats the solution to
this?? Write scripts that create static html pages that update every 20
minutes or so??

And was it the host that limited my connections???

TIA



--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP-DB] TOO MANY CONNECTIONS!!

2002-10-23 Thread Duncan Hill
On Wed, Oct 23, 2002 at 10:18:07PM +0100, Georgie Casey wrote:
 Im getting a too many connections error in my PHP pages at
 http://www.free-ringtones.tv. I presume this is from the MySQL server, and I
 know I access the database a lot for each page. So whats the solution to

MySQL has a default of either 50 or 100 concurrent connections.  Exceed it
and you'll get that error.  That parameter is configurable - if you run the
MySQL daemon itself.  If you use shared hosting, you may not be able to 
tweak it.

Do the pages -need- to be totally dynamic, or can you use the caching system
you mentioned?  If so, then wrap code that stats an HTML page for the time,
and if it's too old, update it.  Be sure to use file locking so you don't
clobber yourself.

Moreover, do you open one connection and re-use it in a page, or do you do
multiple opens and closes?  

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP-DB] Too many Connections error

2001-06-20 Thread Micah Stevens

Hi,

I'm using PHP to connect to a MySQL server, and occasionally I get the 
following error:

Warning: Too many connections in 
/usr/sites/www/gamewardens_forum/forumadmin.php on line 243
Unable to connect to Database Server


I'm using a persistant connection with the function mysql_pconnect, But the 
documentation says that if a connection already exists, a new one will not 
be created. So multiple calls shouldn't be a problem, right?

Any thoughts on this?

THANKS!
-Micah Stevens