Dynadot โ€” .com Transfer

MySql Help Needed

Spacemail by SpaceshipSpacemail by Spaceship
Watch
Impact
21
Oh so i have determined what my problem is and i figured out (sort of) how to fix the problem:

Too Many Connections

Now what i need is someone to point me in the right direction as to where i can institute these methods and if they can be done using PhpMyAdmin.


Using the PHP .htaccess option to lower the connect timeout from the default 60 seconds.

php_value mysql.connect_timeout 20

Server administrators can disable persistent connections for PHP scripts in php.ini file:

[MySQL]
; Allow or prevent persistent links.
mysql.allow_persistent=Off



Your assistance will be rewarded with NP$.
 
0
•••
The views expressed on this page by users and staff are their own, not those of NamePros.
AfternicAfternic
There are a couple of things you can do, and you listed the two most common I think.

Firstly, one of the actions you described can be done through PHPMyAdmin.

If you are on a shared server the best first try would be to try putting the following into a blank document and name it ".htaccess" (note there is nothing before the dot. If your editor has problem saving the document with that filename, save it as another one and rename it in your file handler).

Code:
php_value mysql.connect_timeout 20
php_value mysql.allow_persistent Off

Place the file name .htaccess in your web root (where you have your index.html/php that display the homepage).

If it gives you a server error, try removing the second line.
 
0
•••
another thing you can do which will help if it is a busy site is to actually close the database connections within the script when finished with them, most people only code so that they open it and allow it to close itself which is ussually fine until you come across a problem like this (database connections ussually close on script end if you still have script running that no longer needs the database it can be a waste of resources.)
 
0
•••
cerebus said:
There are a couple of things you can do, and you listed the two most common I think.

Firstly, one of the actions you described can be done through PHPMyAdmin.

If you are on a shared server the best first try would be to try putting the following into a blank document and name it ".htaccess" (note there is nothing before the dot. If your editor has problem saving the document with that filename, save it as another one and rename it in your file handler).

Code:
php_value mysql.connect_timeout 20
php_value mysql.allow_persistent Off

Place the file name .htaccess in your web root (where you have your index.html/php that display the homepage).

If it gives you a server error, try removing the second line.

thanks cerebus but that didn't work

filth said:
another thing you can do which will help if it is a busy site is to actually close the database connections within the script when finished with them, most people only code so that they open it and allow it to close itself which is ussually fine until you come across a problem like this (database connections ussually close on script end if you still have script running that no longer needs the database it can be a waste of resources.)

Any indications on how one might do so?
 
0
•••
Increase the max connections..
 
0
•••
0
•••
0
•••
Appraise.net
Escrow.com
Spaceship
Rexus Domain
CryptoExchange.com
Domain Recover
CatchDoms
DomDB
NameFit
  • The sidebar remains visible by scrolling at a speed relative to the pageโ€™s height.
Back