icon Get the most out of Surmunity, read our tips here! Need an interesting blog to read? You've got to read the Surpass Blog! | Welcome! Please register to access all of our features.

» Surpass Web Hosting Forums » Discussions » PHP, MySQL » MySQL/Persistent Connections

PHP, MySQL General PHP questions. Or go to our PHPsuexec Forum >>

Reply
 
LinkBack Thread Tools Search this Thread Rate Thread
Old November 10th, 2005, 5:29 AM   #1 (permalink)
All Ur Base R Belong 2 Us
Excelling Contributor
 
mr_fern's Avatar
 
Joined in Feb 2005
Lives in Vegas & New York
824 posts
Gave thanks: 2
Thanked 6 times
MySQL/Persistent Connections

It seems Persistent Connections are a trouble for users on shared hosting, as persistent connections can easily lead to blocked access to their databases once they've used up their alloted number of connections, which is not very high since its shared. Most users are using PHP with these MySQL databases.

After going through my own PHP Config php.ini file, I noticed that there's a directive

Code:
[MySQL]
mysql.allow_persistent	=	On	; allow or prevent persistent link
So why aren't the shared servers set with a value of Off?

I'm assuming that if this value is set to Off, even if the persistent connection function is used it would still be a dynamic connection. I say assume since the php.net manual doesn't specify what happens on the mysql_pconnect function page.
__________________
Nobody doing nothing
mr_fern is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old November 10th, 2005, 5:49 AM   #2 (permalink)
is scientific.
Resident.
 
David's Avatar
 
Joined in Mar 2004
Lives in fear of Obama.
Hosted on Pass 7
13,117 posts
Gave thanks: 8
Thanked 34 times
I was reading about this earlier when trying to figured out why another user's Invision Board message board keeps coming up with a max_connections error. I wasn't sure if Persistant Connections was on or off on these shared servers. I assumed it was off, which is what really puzzelled me.

From what you're saying, with PC on, that may very well be the reason the max connections error comes up?
__________________
Quote:
Originally Posted by removed View Post
Internet Explorer rules.
David is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old November 10th, 2005, 6:50 AM   #3 (permalink)
All Ur Base R Belong 2 Us
Excelling Contributor
 
mr_fern's Avatar
 
Joined in Feb 2005
Lives in Vegas & New York
824 posts
Gave thanks: 2
Thanked 6 times
That's usually the cause, that or slow/delayed queries. Those slow queries just cause a spiral down in performance, and they aren't always even queries using tables frequently accessed.
__________________
Nobody doing nothing
mr_fern is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old November 10th, 2005, 7:29 AM   #4 (permalink)
is scientific.
Resident.
 
David's Avatar
 
Joined in Mar 2004
Lives in fear of Obama.
Hosted on Pass 7
13,117 posts
Gave thanks: 8
Thanked 34 times
Hmm. *checks server php.ini file*

actually, maybe I'll do that later. My password is too ridiculous and long to look up again and type in lol
__________________
Quote:
Originally Posted by removed View Post
Internet Explorer rules.
David is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
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 edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On