Pligg not handling simultaneous users

Register an Account
Pligg Chat Room
Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 07-03-2008, 04:11 PM
Casual Pligger
 
Join Date: Apr 2007
Location: Arlington, Virginia
Posts: 47
Pligg seems to fail with only a few simultaneous users.

I ran a simple load test with JMeter. Not a heavy load, just 4 users simultaneously logging in, viewing the homepage and the profile, looping 4 times.

About a third of the time, there is a template error "Parse error: syntax error, unexpected $end" (see image), after part of the pages' HTML has arrived OK.

This also happened to us during manual testing, though rarely.

Though the error message suggests a syntax error, there is clear evidence that the template is actually OK -- since most of the time, the page renders just fine.

By the way, I searched the forum and tried all the usual things. I deleted the files in templates_c just to be sure. Permissions are 777 on templates_c.

This is happening on a Virtual Private Server from LiquidWeb, but also quite similarly on a shared server from GoDaddy, so it is not some quirk of our PHP installation. The loads are small -- 16 page-access total should not be crashing anything.

A colleague suggested that Smarty is re-compiling the templates on every access. If so, is there some way I can configure to avoid that?



----------------------
Error was:

Parse error: syntax error, unexpected $end, expecting ')' in /home/carestor/public_html/qa/templates_c/c_ef20b2b5fff08f636a080a9108ff9329.php on line 605
Attached Thumbnails
Pligg not handling simultaneous users-jmeter_results.png  

Last edited by PierreB; 07-03-2008 at 04:18 PM. Reason: mention second server
Reply With Quote
  #2 (permalink)  
Old 07-03-2008, 04:19 PM
chuckroast's Avatar
Pligg Developer/Coder/Designer
Pligg Version: SVN
Pligg Template: Galleria
 
Join Date: Jun 2006
Posts: 3,832
I don't think you can consider this a Bug with Pligg. I run several pligg sites hosted on the same shared hosting with hundreds of simultaneous users and have no problem.. So it raises the question. What type of hosting environment are you on? What version of Pligg are you using? Can you provide a link to your site? These are all standard things you should address when submitting a bug report.


Download the full Pligg Module Pack





Reply With Quote
  #3 (permalink)  
Old 07-03-2008, 04:28 PM
Casual Pligger
 
Join Date: Apr 2007
Location: Arlington, Virginia
Posts: 47
We are using Pligg 0.9.6.

It occurs on our Virtual Private Server on LiquidWeb; also on a shared server on GoDaddy.

But it does not occur on a shared server at LiquidWeb or a SUSE Linux dev server.

I appreciate that it is not a bug with Pligg -- yet it occurs on all of the pages, on two different servers.

Rather, I guess it is some sort of global setting, causing the templates to be re-compiled on every request.

Last edited by PierreB; 07-03-2008 at 04:53 PM. Reason: typo
Reply With Quote
  #4 (permalink)  
Old 07-03-2008, 04:34 PM
chuckroast's Avatar
Pligg Developer/Coder/Designer
Pligg Version: SVN
Pligg Template: Galleria
 
Join Date: Jun 2006
Posts: 3,832
Without a link to the site it's going to be almost impossible to nail it down to a specific thing. I would defiantly recommend updating your code to the latest version though. Pligg 9.6 is well over a year old and there have been many updates and changes since.


Download the full Pligg Module Pack





Reply With Quote
  #5 (permalink)  
Old 07-03-2008, 04:52 PM
Casual Pligger
 
Join Date: Apr 2007
Location: Arlington, Virginia
Posts: 47
Thanks for the help. I appreciate the rapid response.

The code is under development so I can't give a link to it now -- although all that would show is the half-rendered page with error message (once you managed to reproduce the bug).

However, I see that the successful servers are PHP 5, and those with the error seem to be PHP 4. I will investigate that direction and report back if I find anything interesting.
Reply With Quote
  #6 (permalink)  
Old 07-03-2008, 11:43 PM
dollars5's Avatar
Pligg Donor
 
Join Date: Dec 2006
Location: India
Posts: 1,961
I am sure it is a bug with your template - because I have personally tested yget template and it works fine on heavy traffic sites - with no issues at all.
Reply With Quote
  #7 (permalink)  
Old 07-04-2008, 01:22 AM
cmstheme's Avatar
Donor/Coder
Pligg Version: 9.9
Pligg Template: Squaretle
Donation Level 4 
 
Join Date: Jan 2007
Location: Philippines
Posts: 380
I have Pligg on LiquidWeb VPS1 and never encounter such problem.

From your info, it seems that it is a problem on the template you used. Are you using a custom template?
Reply With Quote
  #8 (permalink)  
Old 07-04-2008, 01:34 AM
moonomo's Avatar
Casual Pligger/Designer
 
Join Date: Jan 2007
Location: PA, USA
Posts: 92
Quote:
However, I see that the successful servers are PHP 5, and those with the error seem to be PHP 4. I will investigate that direction and report back if I find anything interesting.
PierreB is right.

One statement at /libs/link.php cause this error, rarely but sometimes it's panic for some sites.

Quote:
if(phpnum() == 4) {
$main_smarty->force_compile = true;
}
Solution is simple:

Quote:
if(phpnum() == 4) {
$main_smarty->force_compile = false;
}
Pros: You'r site will run faster.
Cons: Sometimes for your some changes, you have to manually clear the cache/template_c folder

Overall, you would be much more happy with the result!

Last edited by moonomo; 07-04-2008 at 01:37 AM. Reason: Added Pros/Cons
Reply With Quote
  #9 (permalink)  
Old 07-05-2008, 04:50 PM
Casual Pligger
 
Join Date: Apr 2007
Location: Arlington, Virginia
Posts: 47
Moonomo, that's brilliant! Thanks!

A colleague suggested that the problem was recompilation of the Smarty templates on every page hit.

A page is being parsed for user 1 and then user 2 hits that page/template -- the template is "pulled out from under the feet" of the parser for user 1 by a recompilation.

That's exactly what you found.

(By the way, I have confirmed that the problem is in PHP 4 as opposed to PHP 5, by switching back and forth between these versions on one of my servers.)

Last edited by PierreB; 07-06-2008 at 03:11 PM.
Reply With Quote
  #10 (permalink)  
Old 07-07-2008, 12:02 PM
moonomo's Avatar
Casual Pligger/Designer
 
Join Date: Jan 2007
Location: PA, USA
Posts: 92
Few months back we had same problem for some client, after a lots brainstorming we came to this solution, all wells end's well ...

Also the speed improvement was really noticeable
Reply With Quote
Reply

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Pligg integration with SMF Forum autoinc Questions and Comments 64 05-19-2008 02:22 AM
One Pligg installation, same users and several websites guarriman Questions and Comments 0 02-12-2007 04:04 AM


Pligg Modules and Pligg Templates from Pligg Pro Find support on the Pligg CMS Forum - 24 hours a day! Make a donation to support Pligg CMS development