By GCAdamC on
I am working with several people on a Drupal 5.8-dev website. Our site is getting very slow (up to 30 secs) and the admin told us that the memory gets taken up quite quickly (1 GB) and then it starts slowing down after that because it starts to use the swap (another 1 GB). This happens quite quickly with only 3 or 4 users on our Drupal site. Does anybody here have any ideas on what could be suspect for this?
Comments
Suspect everything!
custom modules you’ve added, custom php you’ve added, custom theme you’ve added … -dev?
Suspect everything!
How does it work with 5.7?
___________________
It’s in the detaιls…
demonstration portfolio
Reason of Interest
I built a hello world module and then changed the name of the module files (deleting the hello world directory and files) to the name that we are officially using. The 'system' table had an entry in it for the hello world module, which had 'status' set to 1 (active). I could have deleted the entry, but I just re-created the hello world module, and deactivated it.
That behaved as a memory leak, but not sure if this is the cause of it.
Could this be causing it? It could very well be something with Apache/PHP, because that has been customized.
Exactly!
The symptoms that you described are a memory leak (more like a flood than a trickle, in your case) so if you have cured the memory leak, your site will be behaving normally again.
Your module is custom PHP but not Apache: Apache just serves files it asked for. Any PHP code it finds, is sent to the PHP interpreter.
___________________
It’s in the detaιls…
demonstration portfolio
Apache
It is Apache/PHP and the whole system that is running up the massive amounts of memory, but not the PosgreSQL because that is run on a different server. The sysadmin said that in theory, it is not possible for it to happen from the reason mentioned before, but I am not sure.
Did the Drupal DB come to a bad state?
Another possible culprit is that we have the files on our own staging sites and then there is a main staging site that we can check our changes into. All of these instances of Drupal are accessing the same Database. I noticed that when a Drupal Module is added, a row is inserted into the drupal.system DB table. I did this on my personal staging server and activated the module within the administer->site building->module web page. Then, the system got accessed from the main staging server which did not yet have the files in the sites/all/modules/.. directory. The files were located on my user staging directory. Could this have brought the Drupal system to a bad state for some reason and cause all this memory consumption.
The Database is getting run on a different server than is experiencing this massive memory consumption, so the DB itself is not suspect.
Does this sound like something to do with the OS instead of this because a lot of custom work has been done to Apache/PHP and the OS.
Drupal !
If you have written custom PHP code then you might be able get some help on these forums.
But if you really have customised Apache and your OS, that is much more likely to be culprit for this sort of problem. I’m sure the programs you have customised, have their own forums.
Drupal is designed to run on a stable system™.
___________________
It’s in the detaιls…
demonstration portfolio
Thanks
Thanks. I am just going through all possible suspects because the slowdown happened right about when these changes happened. I will post the reason once we catch it.