![]() |
|
#1
|
|||
|
|||
mysql_pconnect: Too many connections errorMy 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
|
||||
|
||||
|
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. __________________
J de Silva Learning Journal | GIDForums™ | GIDNetwork™ | GIDWebhosts™ | GIDSearch™ |
|
#3
|
|||
|
|||
|
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
|
||||
|
||||
|
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? __________________
J de Silva Learning Journal | GIDForums™ | GIDNetwork™ | GIDWebhosts™ | GIDSearch™ |
|
#5
|
|||
|
|||
|
Quote:
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
|
||||
|
||||
Optimising mysqld variablesNo, 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.... ![]() __________________
J de Silva Learning Journal | GIDForums™ | GIDNetwork™ | GIDWebhosts™ | GIDSearch™ |
|
#7
|
|||
|
|||
|
tx i will try that
|
Recent GIDBlog
Toyota - 2008 July Promotion by Nihal
| Thread Tools | Search this Thread |
| Rate This Thread | |
|
|
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