Memory Usage

7 posts by 3 authors in: Forums > CMS Builder
Last Post: September 29, 2010   (RSS)

Re: [roddruce] Memory Usage

By Jason - September 29, 2010

Hi Rod,

There is a line in cmsAdmin/lib/init.php that sets the memory allocation to 128MB if it's able to. This doesn't mean that it's trying to actually use that much. The hosting provider was alerted to this and they have decreased this number to 32MB.

32MB isn't a lot of memory, but it should be fine unless you're running very large scripts that are handling a lot of data. As long as you aren't running into any errors or issues, I wouldn't worry about it.

Hope this helps. Let me know if you have any other questions.
---------------------------------------------------
Jason Sauchuk - Project Manager
interactivetools.com

Hire me! Save time by getting our experts to help with your project.
http://www.interactivetools.com/consulting/

Re: [Jason] Memory Usage

By roddruce - September 29, 2010

Jason, as you say 32MB isn't a lot of memory. Servers in Australia are small compared to the US so I guess they need to conserve resources. I am going to move hosting as these issues will crop up all the time. Thank you for explaining what is happening.

Rod.

Re: [roddruce] Memory Usage

By Dave - September 29, 2010

But if you can get by with 32 megs, meaning if they lowered the limit and there's no problems, then it won't matter.

The reason we increase the limit is because resizing images and creating thumbnails (or any image processing) take a lot of memory. If you're not uploading large images it shouldn't be a problem.

Hope that helps!
Dave Edis - Senior Developer
interactivetools.com

Re: [Dave] Memory Usage

By roddruce - September 29, 2010

Dave, is it the fact that in your script you have made allowances for a 128MB limit that my hosting company is seeing this?

They added this code to the top of the init.php file...

<?php
ini_set('memory_limit','32M');

If I added the memory limit of 32MB to future CMS Builder instals for this hosting server would this mean they wouldn't be alerted to a memory increase?

Rod

Re: [roddruce] Memory Usage

By Dave - September 29, 2010

Yes. CMSB has a lot of code in init.php to "standardize" common hosting environments (and fix common bugs and misconfigurations) into something we can work with. There's one line here:

ini_set('memory_limit', '128M'); // raise memory limit (if allowed)

Your host is running a PHP security patch called "Suhosin" that is detecting that we're trying to do that and telling them. That's all that is happening. We're not using up all the memory or anything like that, just increasing our limit.

I've seen Suhosin before but never that error. So you can just comment out that line in init.php or if you email me CMS/FTP login details I can check if there's a way we can detect that Suhosin setting and add some code to work around it. If you want to email send to dave@interactivetools.com, don't post login details to the forum.

Hope that helps!

PS: If the line they added is at the "top" of the init.php file it probably isn't actually don't anything and is being changed later in the file.
Dave Edis - Senior Developer
interactivetools.com

Re: [Dave] Memory Usage

By roddruce - September 29, 2010

Dave, the hosting company has decided to allow 64MB for CMS builder. Hopefully things should be okay now. If nothing else I have learnt quite a bit about memory.

Rod