Go Back   Pligg CMS Forum > Other > My Pligg Site

Reply
 
LinkBack Thread Tools Display Modes
  #11 (permalink)  
Old 02-23-2007, 09:39 PM
New Pligger
 
Join Date: Jan 2007
Posts: 7
Thanks: 1
Thanked 0 Times in 0 Posts
my website hosted in DreamHost and it take 6 second to load pligg

Is it normal or slow . Can anyone tell me thanks

By the way what pakage pligg forum host on?

I buy the cheapest packet on Dreamhosr may be it host on overcrowded server ( too many site) so it cause pligg running slow
Reply With Quote
  #12 (permalink)  
Old 02-26-2007, 11:51 AM
New Pligger
Pligg Version: 9.9
Pligg Template: coolwater
 
Join Date: Feb 2007
Location: Atlanta, GA
Posts: 22
Thanks: 1
Thanked 5 Times in 5 Posts
The following is a possible remedy to sites that run slow running Pligg:

When I first loaded my pligg site (v9.1) it ran fast. After a week of the site being up it began to slow down. My host contacted me telling me that I had multiple persistent database connections open that were killing the resources on the shared machine my site was on. To remedy this problem, I simply changed the line in the "db.php" file from
PHP Code:
$globals['mysql_persistent'] = true
to
PHP Code:
$globals['mysql_persistent'] = false
Location of edit:
Folder: libs/
File: db.php
Line: 2

This remedy turned off persistent connections and made my site run faster again and my shared host happy.

Last edited by NewsHeatDotCom; 02-26-2007 at 12:28 PM..
Reply With Quote
The Following User Says Thank You to NewsHeatDotCom For This Useful Post:
  #13 (permalink)  
Old 02-26-2007, 01:49 PM
Constant Pligger
 
Join Date: Oct 2006
Posts: 227
Thanks: 56
Thanked 22 Times in 18 Posts
Can one of the developers comment on whether NewsHeatDotCom's suggestion of modifying db.php is a good one and whether it may cause any problems?
Reply With Quote
  #14 (permalink)  
Old 02-26-2007, 02:38 PM
Casual Pligger
 
Join Date: Jan 2007
Posts: 47
Thanks: 4
Thanked 7 Times in 5 Posts
From what I can tell about reading about persistence over here, it does not look like it is a good idea to have persistent connections, unless you have full administration capabilities of your server. The potential issues appear to be that you may not be able to service your users, if the number of persistence connections you reach exceed your server's maximum allowed (this is probably different for each hosting service), and you may lock up your database if a session does not end properly and the connection is not closed. However, this was just a quick glance at the documentation, and I could be missing something.

Rich
__________________
LINKS to Rising Stars of Cyberspace

LINKS Stars - Vote for the Rising Stars of Cyberspace

Last edited by richrf; 02-26-2007 at 11:04 PM..
Reply With Quote
  #15 (permalink)  
Old 02-26-2007, 03:10 PM
New Pligger
Pligg Version: 9.9
Pligg Template: coolwater
 
Join Date: Feb 2007
Location: Atlanta, GA
Posts: 22
Thanks: 1
Thanked 5 Times in 5 Posts
I'm not sure if I'm reading richrf's comment correctly or not on persistent db connections, whether richrf sees modifying that setting as a good decision or not. I have modified the persistent connections on my site and have not noticed any adverse effects from it.

Here is an explanation of persistent/non-persistent connections as I understand them:

A persistent db connection will remain open after a script is done executing. The next time a script is run it will look for an open persistent connection to the database, and if one is available it will utilize that connection. If one is not available it will open another persistent connection. The problem you can run into (especially on shared servers) is not having control over your server settings. If a persistent connection is setup in the server software to stay alive for a long time, you can end up with many connections open, with few being utilized. This will increase the load on the server, and eventually bring it to a crawl.

A non-persistent connection opens a new connection every time it is requested in a script, but then closes all open connections from that script when the script is finished executing, thus freeing up more resources.
__________________
Pligg Site: www.NewsHeat.com
Slogan: Where The Campaign Trails Meet
Pligg Version: beta v9.9 (updated since 9.1)
Template: Modified "coolwater"
Other Sites: Cheesy Movie Night, Tranquil Aggression
Reply With Quote
  #16 (permalink)  
Old 02-26-2007, 03:31 PM
Casual Pligger
 
Join Date: Jan 2007
Posts: 47
Thanks: 4
Thanked 7 Times in 5 Posts
Hi,

Sorry for not being clear. The way I read the documentation of MySQL (and it is very difficult to understand all of the implications without more study), there are two issues regarding persistence:

1) Servers place a limit on the number of persistent connections that you may have. If you use persistent connections, you may bump up against that limit and users may find themselves unable to access the application and will get some sort of unreadable error code (unless the application is designed to provide a more user friendly error code). Whether or not you Pligg app hits this limit is a function of the number of concurrent user connections and the limit that your host provider puts on your app. Very low trafficked sites will probably not hit thes limit.

2) If a session ends without properly disconnecting, the persistent connection may leave locks on the table (particularly bad would be a table lock), that will make it impossible for other users to access the tables with the intention to update it.

So it seems that it is not a good idea to have persistent connections. If you have full access to the server, you can always reboot to kill the connections, but this may not always be possible. Certainly a lot more work would have to be done to really understand the extent of the issues, but without more research and/or info, the default non-persistence is probably the way to go, even though opening and closing connections creates performance overhead. If I went ahead and installed Pligg for www.links.com, I would probably want to review the whole transaction management/error handling code. But first I would have to research MySQL and its default handling. If someone has already looked into it, it would be very helpful.

Anyway, this is where I am at after a very truncated review of the docs.

Rich
__________________
LINKS to Rising Stars of Cyberspace

LINKS Stars - Vote for the Rising Stars of Cyberspace

Last edited by richrf; 02-26-2007 at 11:05 PM..
Reply With Quote
The Following User Says Thank You to richrf For This Useful Post:
  #17 (permalink)  
Old 02-26-2007, 03:47 PM
Casual Pligger
 
Join Date: Feb 2007
Location: England
Posts: 45
Thanks: 7
Thanked 18 Times in 12 Posts
Quote:
Persistent connections are often misused. Unless you have hundreds of connections per second you quite likely do not need persistent connections and unlikely will get major benefit from using them.
Taken from this post discussing persistent MySQL connections.

As far as I can tell, WordPress doesn't use persistent connections. I run a blog that has received 4000 unique pageviews in one hour without any MySQL problems.

This suggests to me that disabling persistent connections is fine and probably the correct thing to do - unless your Pligg site is likely to match Digg for traffic. ;-)

Maybe the developers enabled persistent connections for a reason though?
Reply With Quote
  #18 (permalink)  
Old 03-05-2007, 04:25 PM
Constant Pligger
 
Join Date: Oct 2006
Posts: 227
Thanks: 56
Thanked 22 Times in 18 Posts
Can one of the developers jump in on this?

Why persistent connections are enabled?
Is it a good idea to disable them?
Reply With Quote
  #19 (permalink)  
Old 03-06-2007, 09:12 AM
New Pligger
Pligg Version: 9.9
Pligg Template: coolwater
 
Join Date: Feb 2007
Location: Atlanta, GA
Posts: 22
Thanks: 1
Thanked 5 Times in 5 Posts
I would like to note that my site has been up a few weeks now and I have not had any problems with persistent connections being turned off. I have also not heard any more complaints from my host as far as hogging resources.
__________________
Pligg Site: www.NewsHeat.com
Slogan: Where The Campaign Trails Meet
Pligg Version: beta v9.9 (updated since 9.1)
Template: Modified "coolwater"
Other Sites: Cheesy Movie Night, Tranquil Aggression
Reply With Quote
  #20 (permalink)  
Old 03-06-2007, 10:14 AM
Constant Pligger
 
Join Date: Oct 2006
Posts: 227
Thanks: 56
Thanked 22 Times in 18 Posts
Thanks for the update NewsHeatDotCom ... good to hear it's working.
Reply With Quote
Reply

Thread Tools
Display Modes
Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not 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
Similar Threads
Thread Thread Starter Forum Replies Last Post
Dreamhost One-Click Pligg Install Yankidank Pligg News 14 11-29-2007 11:34 AM
Dreamhost disabled Pligg database noyp General Help 2 10-04-2007 12:57 PM


Search Engine Friendly URLs by vBSEO 3.2.0