By Brian Tastic on
Hi all
I'm fed up with running into PHP memory issues and "The white screen of death". I understand that even on large web applications, if purpose built, do not have the same issues. I was told it is usually bad code at fault.
I have invested a lot of time learning and using drupal for my project and I don't want to migrate away, what can I do to make my site faster and more efficient? Do I have to get rid of large modules like CCK and Views, maybe even Ubercart?
Please advise, I'm at my wits end.
Comments
With every release, Drupal is
With every release, Drupal is getting bigger and requiring more out of your server. However, it has been coded with several different environments and hosting solutions in mind, including even shared hosting environments.
Try enabling caching on your site and optimized javascripts and css. This will create a huge performance increase. If this doesn't work, maybe it's time to move to a different server or upgrade the one your on.
Thanks for your reply
Thanks for your reply omnitrick. However you seem to suggest that it could be the limitations of ones server that is at fault, and whilst I concede that i am on a shared I am on a (generous) shared hosting account, I have been told that poor PHP memory problems are usually the result of poor coding, is this not correct?
...
Why do you assume the problem is poor coding? All applications use a certain amount memory, if the supply is finite then at some stage its going to run out.
more modules = more memory used - its not rocket science mate.
Get more RAM, else start digging into all those contrib modules if you think one is at fault.
One of my servers is handling 100k pv per day with 4gb of RAM, never breaks a sweat, how much dedicated RAM do you have?
Pimp your Drupal 8 Toolbar - make it badass.
Adaptivetheme - theming system for people who don't code.
No
Sounds like a case of a hardware guy (whose hardware is insufficient) blaming the software guys.
Memory is cheap relative to programmers' time.
When you use a highly flexible, generalized tool to do a specific job, you're likely to consume more resources -- perhaps memory, CPU, disk -- than if you had a special-purpose tool. Calling the flexible tool "poor coding" is unprofessional. It's a conscious technical choice.
If it weren't for Moore's Law, we'd all be coding in assembler.
Thanks Yelvignton. I'm not a
Thanks Yelvignton. I'm not a full time dev guy, though I can do basic stuff, so I supose I kind of rely on advice from others, and when I get conflicting info, guess what? I remain confused.
I am coming to the conclusion it is 80% of 1 and 20% the other (just educated guess). I think going on what I have read, that it's 80% hardware incl. ram and 20% coding/module choices.
I think a good plan for me maybe, to streamling my contrib-modules, get rid of any heavyweights, and write my own specific stuff. All this in addition to looking to move over to a good VPS.
Does that sound about right, or am I still barking up the wrong tree?
Rather than suggesting you
Rather than suggesting you build a new site, I'd suggest you move up to a VPS hosting plan where you know how much memory you are using, and how much is available. On shared hosting, the best you'll likely be able to do is increase your php memory limit and hope that your host is not hugely oversold. If you're getting white screens, that's the first thing I'd try. What is your limit currently set to?
Really - you get what you pay for. Shared hosting is cheap, but often inadequate for an ecommerce site. If you intend to make money using a dynamic website, you need to plan to spend money to run it.
http://www.trailheadinteractive.com
Shared hosting is generally
Shared hosting is generally measured in terms of disk space and bandwidth. RAM is almost never mentioned in a shared hosting context. How much guaranteed RAM do you have available for PHP? Most hosts do not guarantee anything in terms of RAM usage, nor will they tell you how much you can use. You may be able to set the PHP memory limit, but there's no guarantee that you'll ever reach that limit you have failures.
http://www.trailheadinteractive.com
What modules are used??
What modules are enabled at your site?? Maybe some modules are useless. Like the Google analytics for instance. This could be added to your theme. Maybe even more modules could be disabled by thinking different??
Maybe some modules are
I have views 2, cck, ubercart and yes google analytics, but why would google analytics module be useless? what could I do that would be better?
Like the Google analytics for
The Google Analytics module
The Google Analytics module is the least of your worries. Views, CCK and Ubercart are huge modules which will definitely tax your system. If your shared hosting environment doesn't allow you to run these modules, you may need to find another CMS (e107, MODx) which plays nicer with what you have.
With every release, Drupal is
I think with every new release, Drupal should be downsizing and getting slimmer not bigger and it should be requiring less from the server not more.
Some find it offensive when you call Drupal a CMS for programmers only, when things go wrong (and that's a given with drupal) only a programmer can figure it out, that's the direction Drupal seems to be going.
A typical siteowner does not enjoy spending hours looking at code wondering what went wrong.
Less is more = a great CMS