Welcome Guest, Not a member yet? Register   Sign In
Is huge PHP memory neccessary for big web apps?
#1

[eluser]Ascenti0n[/eluser]
Hi everyone

I have been developing using Drupal for the last year or so and have noticed the so-called "white screen of death", which has been happening more frequently over the last few months, and is normally a result of insufficient PHP memory allocation. This risk grows the bigger your project gets or the more 'contributed modules' are added.

I started of with a clean Drupal install at 32M, then it had to be increased to 64M then 128M, now even this figure is not safe.

What I want to know is, is this normal for large modern web applications? I'm sure that if I decided to code the functionality I needed using Codeigniter as my base framework, I would cut the project size in half, simply by cutting out all the code and functionality I don't need that comes with a general purpose CMS.

Can anyone shed any light on this for me, is these growing issues are starting to drive me nuts.
#2

[eluser]Johan André[/eluser]
Usually (but that depends on the error_reporting setting) when PHP tries to allocate too much memory it shows an error message. ("Tried to allocate xxx bytes...").

I got this alot when resizing VERY large (5-10Mb) images with php.

It does'nt really answer your question but at least you know you are not alone! Smile
#3

[eluser]TheFuzzy0ne[/eluser]
Is it just a specific module that's causing the problem? If it's just processing text, then there's a good chance that the module could be written much better.
#4

[eluser]Yorick Peterse[/eluser]
Big fat web apps shouldn't require a lot of memory, atleast not by default. It all depends on how you code it and what you are making.
#5

[eluser]Ascenti0n[/eluser]
[quote author="TheFuzzy0ne" date="1243696369"]Is it just a specific module that's causing the problem? If it's just processing text, then there's a good chance that the module could be written much better.[/quote]


No not just one module. As with many Drupal installations, my project has quite a few, including the 'almost standard' module: CCK and Views.

I know that Drupal is built to be modular and is a general purpose CMS, that's why I ask the question: If I built my own using Codeigniter as a base for example, writing classes etc that is specific for my project, it is likely to cut the project size dramatically, would it also prevent PHP memory problems?
#6

[eluser]TheFuzzy0ne[/eluser]
An application is only as good as the developer that wrote it, so no, it won't necessarily prevent the problems pertaining to lack of RAM. As CodeIgniter only leaves a small memory footprint, if you have problems with RAM, then it's likely to be the developers code causing the problem. The only CodeIgniter library I know of that does seem to have issues with RAM, is the XML-RPC library - Oh, and the Image library if you're trying to process large images.
#7

[eluser]elvix[/eluser]
a white screen of death would seem to indicate that there's an error, but you've got error reporting turned off. you might want to try turning it back on and see where the error is coming from. Could be a faulty module, permissions issue, memory issue, etc. Hard to tell without knowing a little more.
#8

[eluser]depthcharge[/eluser]
When you get the wsod is it instant, or does it pause for a good while before throwing back a wsod.

I ask because I have found that usually if it's a memory limit issue, it usually takes a while before giving up and throwing the error / wsod.

If it's instant, then could well be some other issue/error being the cause.

I am surprised at the amount of SQL Queries Per Pages, Some Drupal Config's chuck out.
#9

[eluser]Ascenti0n[/eluser]
[quote author="depthcharge" date="1243752862"]When you get the wsod is it instant, or does it pause for a good while before throwing back a wsod.

I ask because I have found that usually if it's a memory limit issue, it usually takes a while before giving up and throwing the error / wsod.

If it's instant, then could well be some other issue/error being the cause.

I am surprised at the amount of SQL Queries Per Pages, Some Drupal Config's chuck out.[/quote]

For me the 'WSOD' is instant, mostly memory (I dodn't understand the difference between normal memory and memory allocated to php unless it is a config for php/apache).

Recently there was a conflict between two modules that caused the same. What concerns me about drupal is that if something doesn't work, then nothing works, it's not like just one aspect of the site stops working with an error message.

I agree with the amount of SQL queries, it's scarey, not to mention can poor performance that goes with it.

MY APOLOGIES: This thread is turning out to be a Drupal help thread, which was not the intention of my original post.
#10

[eluser]depthcharge[/eluser]
This is a little off-topic, but i have got to ask where did you get your cool avatar?

Is it something you created yourself or from some kind of online system?

:-)




Theme © iAndrew 2016 - Forum software by © MyBB