GIDForums  

Go Back   GIDForums > Computer Programming Forums > MySQL / PHP Forum
User Name
Password
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

 
 
Thread Tools Search this Thread Rate Thread
  #1  
Old 08-Aug-2005, 15:44
agligich agligich is offline
New Member
 
Join Date: Aug 2005
Posts: 4
agligich is on a distinguished road

mysql_pconnect: Too many connections error


My application is accessed my many users
So i am running application with persistance connection(mysql_pconnect)
I keep getting php warning: Too many connections and my db server goes down and I have to reboot db server to get application to work

I am running my aplication on Linux platform with Apache/1.3.33 PHP/4.3.11 MySQL/4.1.10a
I set max connections to 500
But the error still keeps appearing

Can anyone suggest anything?
Thanks a lot...
  #2  
Old 09-Aug-2005, 08:30
JdS's Avatar
JdS JdS is offline
Senior Member
 
Join Date: Aug 2001
Location: KUL, Malaysia
Posts: 3,371
JdS will become famous soon enough
Is this on a shared hosting environment or are you running this on a dedicated server?

There was a time I was wondering about mysql_pconnect() vs. mysql_connect() myself. After some unqualified tests, I settled for non-persistant connections and I have not regretted it to this day. Many people argue (convincingly) that persistant connections are unnecessary where MySQL is concerned and I agree...

Anyway, "too many connections" are I think, a symptom of inefficient queries. I can suggest you look at the processlist i.e. mysql> SHOW PROCESSLIST; and your slow-query log.
  #3  
Old 09-Aug-2005, 08:42
agligich agligich is offline
New Member
 
Join Date: Aug 2005
Posts: 4
agligich is on a distinguished road
thanks for your replay

my db server is a dedicated server and my application runs on 2 seporate servers

I actually need to use persistance connection to establish expected performance of the application to all users at the same time

I watched SHOW PROCESSLIST after i got this error and my server went down; but didn't see any slow query

I do have a bunch of processes sleeping but i think its normal

I am not sure if there a way to check log for processes that could be helpful
would u know if its possible

thanks a lot again
  #4  
Old 09-Aug-2005, 08:48
JdS's Avatar
JdS JdS is offline
Senior Member
 
Join Date: Aug 2001
Location: KUL, Malaysia
Posts: 3,371
JdS will become famous soon enough
Have you set the server to maintain a slow query log? At least until you figure this all out.

Also, what have you actually done, if anything, to tweak the MySQL server before this?
  #5  
Old 09-Aug-2005, 09:05
agligich agligich is offline
New Member
 
Join Date: Aug 2005
Posts: 4
agligich is on a distinguished road
Quote:
Originally Posted by JdS
Also, what have you actually done, if anything, to tweak the MySQL server before this?

Are u refering on how did i get it to work
Well it works now; but sometimes all of a sudden it gets overloade

tx for suggestion on maintaining a log; i will do that
tx
  #6  
Old 09-Aug-2005, 09:15
JdS's Avatar
JdS JdS is offline
Senior Member
 
Join Date: Aug 2001
Location: KUL, Malaysia
Posts: 3,371
JdS will become famous soon enough

Optimising mysqld variables


No, I mean have you optimised the key mysqld variables like table_cache, key_buffer_size etc.?

Usually I would compare the ratio between open_tables and opened_tables to adjust the table_cache variable.

With the key_buffer_size, I normally calculate the ratio between key_read_requests and key_reads.

Also, what is the status of your Qcache_hits?

Stuff like that....
  #7  
Old 09-Aug-2005, 09:16
agligich agligich is offline
New Member
 
Join Date: Aug 2005
Posts: 4
agligich is on a distinguished road
tx i will try that
 
 

Recent GIDBlogToyota - 2008 July Promotion by Nihal

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Rate This Thread
Rate This Thread:

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 Off
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
[Tutorial] GUI programming with FLTK dsmith FLTK Forum 10 03-Oct-2005 15:41
Help with syntax errors PeteGallo C Programming Language 7 08-Aug-2005 20:30
What is "Ambigious symbol" ??*( a compilation error) small_ticket CPP / C++ Forum 2 07-Jan-2005 21:10
Error C2146: syntax error : missing ',' before identifier 'C4' mattchew008 CPP / C++ Forum 2 19-Dec-2004 06:06
Can enum have same name as class? crystalattice CPP / C++ Forum 3 08-Dec-2004 16:43

Network Sites: GIDNetwork · GIDWebHosts · GIDSearch · Learning Journal by J de Silva, The

All times are GMT -6. The time now is 01:32.


vBulletin, Copyright © 2000 - 2008, Jelsoft Enterprises Ltd.