Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
Pages: [1]
Send this topic | Print
Topic: Changing PHP Memory Limit?  (Read 1307 times)
« on: January 11, 2008, 06:01:49 PM »
markneub Offline
Newbie

View Profile
*
Posts: 5



Hi,

I'm using my T35 account with an open source Content Management System called Silverstripe (http://www.silverstripe.com).  Silverstripe requires at least 32M of php memory, which is the maximum allowed by T35, it seems (according to phpinfo()).  Normally the pages are all cached to allow pages to load quickly and decrease load on the server, but occasionally and rarely Silverstripe tries to allocate a larger amount of memory and encounters a fatal error (usually 50M).  I've tried increasing the php memory in my PHP file, which had no effect, and with .htaccess, which caused me an internal server error on all descendant pages.  Is it possible to increase PHP memory on specific accounts?  The two domains I'm currently hoping to increase the PHP memory limit on are jfsyork.org and stayingconnectedyork.org.  I'm not really an expert with PHP stuff by any means so hopefully I've explained my problem correctly.

Thanks,
Mark
Report to moderator   Logged

 
« Reply #1 on: January 11, 2008, 07:06:06 PM »
markneub Offline
Newbie

View Profile
*
Posts: 5



Just ran phpinfo() again and noticed that php memory limit is 12M, not 32M.  I guess Silverstripe doesn't usually even exceed the 12M, because most of the time my pages load fine.  It's not good to have the user presented with the occasional Fatal error, though.
Report to moderator   Logged
« Reply #2 on: January 12, 2008, 08:28:16 PM »
Alex Melen Offline
President / Founder
Administrator
Addict

View Profile WWW
*****
Posts: 2,065



I just checked with the people who make Silverstripe and they said it only requires 8mb... I haven't seen too many scripts that require more than 12mb per thread/process since the limit isn't a total memory limit but a 'per thread' limit. Next time you get the error can you take a screenshot and make a note of what you were doing that caused it?
Report to moderator   Logged

« Reply #3 on: January 13, 2008, 01:37:49 PM »
markneub Offline
Newbie

View Profile
*
Posts: 5



I think that the error only occurs after Silverstripe flushes its caches, which it normally doesn't do, so I rarely get the error when normally using the site.  It's strange because the frequency seems to come and go.  For example, I haven't noticed it happening recently on my jfsyork.org/silverstripe/ install, but stayingconnectedyork.org brings up the problem more.  I was able to bring up the error by forcing Silverstripe to flush its cache.  I'm not sure I completely understand the error because I can't replicate it reguarly, but if everything is running fine, I should also be able to do this during development to update the site when I modify templates.  Anyway, here's the error:




Report to moderator   Logged
« Reply #4 on: January 14, 2008, 10:57:41 AM »
Alex Melen Offline
President / Founder
Administrator
Addict

View Profile WWW
*****
Posts: 2,065



I'm not sure if I understand it correctly but it's trying to allocate 50mb into a single process memory? That seems very extreme! Making the php memory limit over 50mb will open it up to a lot of abuse.

I'll forward it to our tech team, but in general, you might want to search on google to see if anyone else ever had this problem and might be worth contacting silverstripe support.
Report to moderator   Logged

« Reply #5 on: January 14, 2008, 11:38:29 AM »
markneub Offline
Newbie

View Profile
*
Posts: 5



Thanks for looking into it Alex.  I actually just went back and counted the number of digits in the error message more closely, and it looks like the first number is indeed 32M, but the second number is only 5M.  So maybe the process only requires 12M+5M=17M, not 50M.  People have had this issue with Silverstripe before, but I have already tried the two solutions that are suggested to no avail.

Here's a forum post by a leader Silverstripe developer suggesting 32M of php memory:
http://www.silverstripe.com/site-builders-forum/flat/945#post953

Everything I've found on Silverstripe's site is "minimum 20M, but suggests 32M" for the php memory limit

Here's a post I found on Google from another hosting provider:
http://support.hostnine.com/index.php?_m=knowledgebase&_a=viewarticle&kbarticleid=157

Does that work/am I allowed to do it on T35?

Thanks,
Mark
Report to moderator   Logged
« Reply #6 on: January 14, 2008, 03:16:13 PM »
Alex Melen Offline
President / Founder
Administrator
Addict

View Profile WWW
*****
Posts: 2,065



Mark, I just modified the server settings to 24M. Let's see if it helps.
Report to moderator   Logged

« Reply #7 on: January 14, 2008, 05:41:11 PM »
markneub Offline
Newbie

View Profile
*
Posts: 5



Thanks, Alex  cool

Still seems to be somewhat of an issue, though.  Sort of perplexing:

Accessing
http://www.jfsyork.org/silverstripe/?flush=1
does NOT cause an error, whereas accessing
http://www.stayingconnectedyork.org/?flush=1
DOES cause an error.  Very strange!  They're running the exact same software with the same configuration settings.  I removed all unnecessary files from the stayingconnectedyork.org Silverstripe install, and in fact the jfsyork.org/silverstripe install has a lot more template files and page types, that could potentially increase the memory usage when the cache is flushed.

Any thoughts?

Edit: I should add that I was meeting with the client today, and we encountered the error several times without explicitly calling a cache flush using ?flush=1, so it still remains a problem for general users of the site.
« Last Edit: January 14, 2008, 05:42:50 PM by markneub » Report to moderator   Logged
« Reply #8 on: January 15, 2008, 10:06:02 AM »
Alex Melen Offline
President / Founder
Administrator
Addict

View Profile WWW
*****
Posts: 2,065



All of this is after the change to 24mb? The current limit should be well above the minimum requirements for the script.. Have you tried contacting the people who make the software?
Report to moderator   Logged

 
Pages: [1]
Send this topic | Print
Jump to:  

Powered by SMF | SMF © 2006-2008, Simple Machines LLC