visitor (0 QPoints)
  • FR
  • EN
  • NL
  • DE
  • ES
315 experts, 1193 registered users, 1659 questions already answered
European Experts Exchange, the very best site for high-quality IT solutions

New Improved Search!

 


05/10/2011 1h30 : Steve Jobs is dead, the father of Apple ][ is gone, we are all orphaned.

Databases :: MySql :: mysql_pconnect doubt...


By: FiatLink Belgium  Date: 02/06/2003 00:00:00  English  Points: 100 Status: Answered
Quality : Excellent
my current project is a multi-user, concurrent access web application. Due to logic design, I am using mysql ver 4.0.13 supports INNODB type table for transaction and explicit rollback.

I am having doubt if I should use mysql_pconnect. I read up Good and Bad comments about this pconnect from internet so far. Good in the sense of efficiency, reduce overhead. Bad in the sense of ...??? something like bring the transaction block to the next script something...

For short, should I use it in my project case? my php is ver 4.2.3 with apache ver 1.3.27.

appreciate!


By: VGR Date: 02/06/2003 16:40:00 English  Type : Comment
on *nix (linux), yes.
On Windows, no.

My experience is that it zombifies Apache slots on Win32
By: FiatLink Date: 03/06/2003 05:23:00 English  Type : Comment
what other things should I beware of if decide to use the mysql_pconnect? given that the concurrent user access could be climbing up to 3,4 thousands.

do I able to test this mysql_connect in LAN development? Will the pconnect able to identify LAN individual computer IP?
By: VGR Date: 03/06/2003 05:32:00 English  Type : Comment

the pconnect() means only that upon finishing, the PHP script ( a page) doesn't mysqm_close() implicitly but leaves the DB connection to persist, hence the name. On subsequent uses of the same sessionID, the link is reused at no cost. That's how it works. And it works fine. It speeds scripts up a bit, roughly 15% I would say - if you're not on Windows and not having memory&CPU&other resources problems - so in fact again if you're not on Windows :D - )

In turn, the sessionID in PHP is linked to the instance of the client browser. So yes, it's linked automatically and reliably to a soecific client, but no it's not linked to the IP address. The latter may even change, as long as the browser stays open it's the same instance.
By: FiatLink Date: 03/06/2003 19:12:00 English  Type : Comment
almost there

I will use quite intense of transaction, as well as explicit commit and rollback logic in my design. Will mysql_pconnect have any impact/drawback to this situation?


By: VGR Date: 03/06/2003 19:18:00 English  Type : Comment
I don't think so. It should be for the best.

My suggestion : try and test-stress your webserver with one of those free stressing tools, like the (good) one from Merdu$oft
By: FiatLink Date: 03/06/2003 20:05:00 English  Type : Comment
good

Do I need to take care of the mysql connection setting I have? Given if I could have dealing with 3~4 thousand user access and login into my application concurrently, what could be the standard setting?

you are saying Merdusoft? any URL?
By: VGR Date: 03/06/2003 20:08:00 English  Type : Answer
1) sorry, you have to try to figure it out 8-)
2) you always have a priviledged Console root access whatever the number of user connections
3) yes, URI is www.microsoft.com :D

Do register to be able to answer

EContact
browser fav
page generated in 1187.894820 milliseconds

Why Google AdSense ads ?

compteur
 Ranking-Hits PageRank for this page