Ravens PHP Scripts: Forums
 

 

View next topic
View previous topic
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> MySQL
Author Message
manunkind
Client



Joined: Apr 26, 2004
Posts: 368
Location: Albuquerque, NM

PostPosted: Tue May 08, 2007 6:00 pm Reply with quote

Hello guys,

I just got the below note from my new host and wanted to see if anything could be done in Nuke to change this. Has anybody heard this before? Can anything be done?

Quote:
System administration has noted that your account appears to be using persistent connections in some of the software used on your site. Persistent connections are by and large not necessary for most software to function, and they can cause issues with your account.

To explain a bit further, persistent connections are one method PHP scripts may use to open a connection to a MySql database. Using persistent connecting is only useful in an environment with a high overhead in connecting to the MySql database itself - in your case the connection (and 'cost' in resources) is negligible compared to using persistent connections as all of your queries are executed immediately.

The persistent connections in this case are simply sitting idle consuming memory and may bring your site close to the predefined limits set for accounts in the shared hosting environment. If you have a database intensive site, this could make the site appear sluggish or appear to be down while the initial queries time out (this can take up to 300 seconds, depending on several factors).

You will need to review your code and see where these persistent connections are coming from, as spikes in traffic could cause your site to appear to be unavailable to your visitors.


Any ideas or opinions? Running Nuke 7.6.

_________________
PC Sympathy 
View user's profile Send private message Visit poster's website
hitwalker
Sells PC To Pay For Divorce



Joined:
Posts: 5661

PostPosted: Tue May 08, 2007 6:09 pm Reply with quote

..huh...they can check that..
why dont they ?
in some cases it can help but but it does take up extra resources...
maybe thats what they dont like.
 
View user's profile Send private message
manunkind







PostPosted: Tue May 08, 2007 6:57 pm Reply with quote

That's why I wanted to post and find out more. If this is the case, then wouldn't changing a few lines of connection code make Nuke run more efficient?
 
Gremmie
Former Moderator in Good Standing



Joined: Apr 06, 2006
Posts: 2415
Location: Iowa, USA

PostPosted: Tue May 08, 2007 7:15 pm Reply with quote

Nuke does not use persistent connections. See db/db.php. It is passing in false for the persistent flag to the sql_db constructor. This causes Nuke to call mysql_connect() (non-persistent connect) instead of the persistent mysql_pconnect() call.

_________________
GCalendar - An Event Calendar for PHP-Nuke
Member_Map - A Google Maps Nuke Module 
View user's profile Send private message
Gremmie







PostPosted: Tue May 08, 2007 7:18 pm Reply with quote

And even for the legacy $dbi variable it is using the non-persistent connect call.
 
Raven
Site Admin/Owner



Joined: Aug 27, 2002
Posts: 17088

PostPosted: Tue May 08, 2007 7:25 pm Reply with quote

Many hosts, including Raven Web Hosting, disable the persistent connections so it matters not what the application does.
 
View user's profile Send private message
manunkind







PostPosted: Tue May 08, 2007 7:32 pm Reply with quote

Hmmm ok. Thanks everybody. I asked them for a sample query or something where I can determine what in the software is causing it.
 
Gremmie







PostPosted: Sun May 13, 2007 10:58 am Reply with quote

I was just looking at NukeTreasury and noticed it was calling mysql_pconnect(). Are you running that module?

I have version 1.0 and this is in the ipnppd.php file that is used for IPN callbacks.
 
manunkind







PostPosted: Sun May 13, 2007 11:27 am Reply with quote

Nope, not running that. The only big things that aren't standard Nuke is the Gallery module and that abandoned Amazon module from PrecioGasolina.com.

Thanks anyway. Smile
 
Gremmie







PostPosted: Sun May 13, 2007 12:34 pm Reply with quote

You can always do a find/grep and look for mysql_pconnect(). Smile
 
Display posts from previous:       
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> MySQL

View next topic
View previous topic
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum


Powered by phpBB © 2001-2007 phpBB Group
All times are GMT - 6 Hours
 
Forums ©