Memory Usage

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

By roddruce - September 29, 2010

Hello again,

I have just had another CMS Builder memory usage warning from my hosting company on my own website not my client's site this time. Details below.

This has come about after installing "Instant Website" and just using CMS Builder as any user would. Making admin changes and text changes in the web pages. No image uploads but quite a few page refreshes to see changes.

My question really is now. Do I need to find another host that allows more memory? Does US hosting offer more on shared hosting?

Cheers - Rod

============================================================================

Dear Client,

This is a courtesy notice from Hostingbay.com.au regarding your account [fasttrackwebsites.com.au].

HostingBay is receiving below notifications in reference to the following PHP script. Please see the report below:

=================================================================
"Sep 29 06:44:35 pantheon suhosin[2952]: ALERT - script tried to increase memory_limit to

134217728 bytes which is above the allowed value (attacker '58.166.85.98', file '/home/fasttrac/public_html/cmsAdmin/lib/init.php', line 104)

=================================================================

We proactively have optimized your script by changing its memory limit to 32MB, because it is using the server memory greater than it is allowed.

A new line block has been added to your script, ini_set('memory_limit', '32M'); and a php.ini script file has been created under your public_html folder.

Our current configuration allows scripts to allocate maximum 32 MB of memory.

Please see High Resource Usage Policy and Hostingbay Service Agreement at:

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: [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