Re: How often do I need to connect to MySQL database?
- From: Jerry Stuckle <jstucklex@xxxxxxxxxxxxx>
- Date: Wed, 14 Mar 2007 15:05:06 -0500
zzapper wrote:
On Mar 14, 3:38 am, Jerry Stuckle <jstuck...@xxxxxxxxxxxxx> wrote:zzapperwrote:Hi,You do NOT want to use mysql_pconnect(). This does create persistent
At present at the top of each of my php pages I reconnect to my
database
mysql_connect(...);
is that actually necessary/good practice. Isn't there something about
persistent connections.
--
zzapper
Best of VimTips
http://www.vim.org/tips/tip.php?tip_id=305
Hi
So is it normal to connect to the db once per page, the reason I ask
this is that I'm getting "you gave exceeded the maximum number of
connections per hour (400)" from my webserver, but I'm currently to
only one accessing it!
Does "require once" only prevent me from connecting more than once per
page?
--
zzapper
Best of VimTips
http://www.vim.org/tips/tip.php?tip_id=305
No, every page must make its own connection to the server. At the end of the page, that connection will be closed by the PHP cleanup if you don't do it yourself.
What's not clear is if this is your server or a shared host. If this is your own server, you need to change your MySQL setup (try comp.databases.mysql for help). If this is a hosted server, you need to talk to your host.
But if I were in this position on a hosted server, I'd find another host. 400 connections per hour is nothing. And if that's what they limit you to, chances are they're overselling their servers.
--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@xxxxxxxxxxxxx
==================
.
- References:
- How often do I need to connect to MySQL database?
- From: zzapper
- Re: How often do I need to connect to MySQL database?
- From: Jerry Stuckle
- Re: How often do I need to connect to MySQL database?
- From: zzapper
- How often do I need to connect to MySQL database?
- Prev by Date: I solve my problemm
- Next by Date: ideabox from http://ideabox.phpoutsourcing.com/
- Previous by thread: Re: How often do I need to connect to MySQL database?
- Next by thread: Can anybody share me the Canadian PostCode Database
- Index(es):
Relevant Pages
|
|