Question about keeping the server load down...

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
User avatar
Mr Tech
Forum Contributor
Posts: 424
Joined: Tue Aug 10, 2004 3:08 am

Question about keeping the server load down...

Post by Mr Tech »

This what I got from my web host as a sugegstion to keep my scripts running fast and the server laod down.
Being a website using dynamic pages and database-driven, we suggest the use of persistent queries on your database, avoid exceeding the servers maximum mysql connections by spliting it up between separate databases.
How do I use persistent queries on my database?

Thanks

Ben
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

mysql_pconnect()
User avatar
Maugrim_The_Reaper
DevNet Master
Posts: 2704
Joined: Tue Nov 02, 2004 5:43 am
Location: Ireland

Post by Maugrim_The_Reaper »

Be careful - if you use a lot of mysql queries your persistent connection can make things worse - not better. Have some idea of what difference it truly makes before making it a permanent fixture.

I know of a number of hosts who ban persistent connections outright...
User avatar
n00b Saibot
DevNet Resident
Posts: 1452
Joined: Fri Dec 24, 2004 2:59 am
Location: Lucknow, UP, India
Contact:

Post by n00b Saibot »

:lol:

Code: Select all

if($_SERVERї'load'] > $MAX_LOAD) mysql_dontconnect();
:lol:
Post Reply