CiviCRM Community Forums (archive)

*

News:

Have a question about CiviCRM?
Get it answered quickly at the new
CiviCRM Stack Exchange Q+A site

This forum was archived on 25 November 2017. Learn more.
How to get involved.
What to do if you think you've found a bug.



  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Installing CiviCRM »
  • Drupal Installations (Moderator: Piotr Szotkowski) »
  • Out of memory errors when $drupal_root is correct in civicrm.settings.php
Pages: [1]

Author Topic: Out of memory errors when $drupal_root is correct in civicrm.settings.php  (Read 2726 times)

jerrygarciuh

  • Guest
Out of memory errors when $drupal_root is correct in civicrm.settings.php
August 12, 2009, 03:08:30 pm
Hi all,

I am porting a Drupal/CiviCRM site to a new server.  I have Drupal running fine now but when I update civicrm.settings.php to have the correct $drupal_root I immediately get white screened and the logs have:

[Wed Aug 12 15:00:53 2009] [error] [client 24.252.73.183] PHP Fatal error: Allowed memory size of 67108864 bytes exhausted (tried to allocate 7897026 bytes) in /var/www/vhosts/mysite.org/httpdocs/includes/bootstrap.inc on line 735

It may also be relevant that I did not have the normal Drupal htaccess file from the origianl site and have used one from the Drupal forums.  I'll past that in below my sig in case you are curious.

Any advice?

David

#
# Apache/PHP/Drupal settings:
#

#added by rod
AddType x-mapp-php5 .php
php_value memory_limit 64M


# Protect files and directories from prying eyes.
<FilesMatch "\.(engine|inc|info|install|module|profile|po|sh|.*sql|theme|tpl(\.php)?|xtmpl)$|^(code-style\.pl|Entries.*|Repository|Root|Tag|Template)$">
  Order allow,deny
</FilesMatch>

# Don't show directory listings for URLs which map to a directory.
Options -Indexes

# Follow symbolic links in this directory.
Options +FollowSymLinks

# Make Drupal handle any 404 errors.
ErrorDocument 404 /index.php

# Force simple error message for requests for non-existent favicon.ico.
<Files favicon.ico>
  ErrorDocument 404 "The requested file favicon.ico was not found.
</Files>

# Set the default handler.
DirectoryIndex index.php

# Override PHP settings. More in sites/default/settings.php
# but the following cannot be changed at runtime.

# PHP 4, Apache 1.
<IfModule mod_php4.c>
  php_value magic_quotes_gpc                0
  php_value register_globals                0
  php_value session.auto_start              0
  php_value mbstring.http_input             pass
  php_value mbstring.http_output            pass
  php_value mbstring.encoding_translation   0
</IfModule>

# PHP 4, Apache 2.
<IfModule sapi_apache2.c>
  php_value magic_quotes_gpc                0
  php_value register_globals                0
  php_value session.auto_start              0
  php_value mbstring.http_input             pass
  php_value mbstring.http_output            pass
  php_value mbstring.encoding_translation   0
</IfModule>

# PHP 5, Apache 1 and 2.
<IfModule mod_php5.c>
  php_value magic_quotes_gpc                0
  php_value register_globals                0
  php_value session.auto_start              0
  php_value mbstring.http_input             pass
  php_value mbstring.http_output            pass
  php_value mbstring.encoding_translation   0
</IfModule>

# Requires mod_expires to be enabled.
<IfModule mod_expires.c>
  # Enable expirations.
  ExpiresActive On

  # Cache all files for 2 weeks after access (A).
  ExpiresDefault A1209600

  # Do not cache dynamically generated pages.
  ExpiresByType text/html A1
</IfModule>

# Various rewrite rules.
<IfModule mod_rewrite.c>
  RewriteEngine ON

  # If your site can be accessed both with and without the 'www.' prefix, you
  # can use one of the following settings to redirect users to your preferred
  # URL, either WITH or WITHOUT the 'www.' prefix. Choose ONLY one option:
  #
  # To redirect all users to access the site WITH the 'www.' prefix,
  # (http://example.com/... will be redirected to http://www.example.com/...)
  # adapt and uncomment the following:
  # RewriteCond %{HTTP_HOST} ^example\.com$ [NC]
  # RewriteRule ^(.*)$ http://www.example.com/$1 [L,R=301]
  #
  # To redirect all users to access the site WITHOUT the 'www.' prefix,
  # (http://www.example.com/... will be redirected to http://example.com/...)
  # uncomment and adapt the following:
  # RewriteCond %{HTTP_HOST} ^www\.example\.com$ [NC]
  # RewriteRule ^(.*)$ http://example.com/$1 [L,R=301]

  # Modify the RewriteBase if you are using Drupal in a subdirectory or in a
  # VirtualDocumentRoot and the rewrite rules are not working properly.
  # For example if your site is at http://example.com/drupal uncomment and
  # modify the following line:
  # RewriteBase /drupal-6.6
  #
  # If your site is running in a VirtualDocumentRoot at http://example.com/,
  # uncomment the following line:
  RewriteBase /

  # Rewrite URLs of the form 'x' to the form 'index.php?q=x'.
  RewriteCond %{REQUEST_FILENAME} !-f
  RewriteCond %{REQUEST_FILENAME} !-d
  RewriteCond %{REQUEST_URI} !=/favicon.ico
  RewriteRule ^(.*)$ index.php?q=$1 [L,QSA]
</IfModule>

Donald Lobo

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 15963
  • Karma: 470
    • CiviCRM site
  • CiviCRM version: 4.2+
  • CMS version: Drupal 7, Joomla 2.5+
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: Out of memory errors when $drupal_root is correct in civicrm.settings.php
August 12, 2009, 07:06:05 pm

how many other drupal modules do you have enabled?

do you have any other non-standard civicrm modules installed? You might want to disable all the modules and enable them one at a time to see which one causes the memory explosion

lobo
A new CiviCRM Q&A resource needs YOUR help to get started. Visit our StackExchange proposed site, sign up and vote on 5 questions

jerrygarciuh

  • Guest
Re: Out of memory errors when $drupal_root is correct in civicrm.settings.php
August 12, 2009, 07:23:03 pm
Hi Lobo,

Thank you for the reply.  As far as I know there are no non-standard civicrm modules.  The site came from developers who have been fired.  I am a solid OO PHP programmer but have no special expertise in CiviCRM or Drupal.

The site loads reasonably quickly when CiviCRM does not load.  When $drupal_root is correct it pegs the server every time.

I loaded the admin's by module view and got the following 65 modules.  Is this excessive by normal Drupal standards?

I very much appreciate your taking time with me on this.

In the morning I will look to disable some modules and enable CiviCRM and see if this helps.

TIA

David

Advanced help
Book
CiviCRM
CiviMember Roles Sync
Contact
Content Permissions
Date Tools
FCKeditor
ImageAPI
ImageCache UI
Lightbox2
Menu
Node
Nodequeue
Pathauto
Publish Content
Search
SimpleTest
System
Taxonomy Access Control
Cart
Catalog
Donate
UC Gift Order
Payment
Product
Shipping Quotes
Roles
Stock
Tax Report
Update status
User
Views UI
Block
Conditional Actions
CiviGroup Roles Sync
Comment
Content
Date
Database logging
Filter
ImageCache
IMCE
Locale
Menu breadcrumb
Node import
Path
Poll
Rules Administration UI
Secure Pages
Statistics
Taxonomy
Attribute
Cart Links
Credit Card
Donation Product
Order
PayPal
Product Kit
Reports
Shipping
Store
Taxes
Upload
Views

Donald Lobo

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 15963
  • Karma: 470
    • CiviCRM site
  • CiviCRM version: 4.2+
  • CMS version: Drupal 7, Joomla 2.5+
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: Out of memory errors when $drupal_root is correct in civicrm.settings.php
August 12, 2009, 08:10:03 pm

civicrm is a memory hog, but not that big a hog :) you might want to use the devel module and see which other modules are consuming a fair amount of memory

lobo
A new CiviCRM Q&A resource needs YOUR help to get started. Visit our StackExchange proposed site, sign up and vote on 5 questions

Piotr Szotkowski

  • Moderator
  • I live on this forum
  • *****
  • Posts: 1497
  • Karma: 57
Re: Out of memory errors when $drupal_root is correct in civicrm.settings.php
August 13, 2009, 02:57:45 am
You might also want to try upping the PHP’s memory_limit to 128M and see whether everything works then (and check which modules get you over the limit). As Lobo says, checking out the Devel module is also a good idea.
If you found the above helpful, please consider helping us in return – you can even steer CiviCRM’s future and help us extend CiviCRM in ways useful to you.

jerrygarciuh

  • Guest
Re: Out of memory errors when $drupal_root is correct in civicrm.settings.php
August 13, 2009, 07:41:47 am
Thanks for the reply Piotr, I upped exec time to 60 seconds and memory to 128M and stopped and started httpd but the symptom remains the same. I will check out the Devel module now.

Lobo: Thanks for the reply  I will check out the Devel module now.

Piotr Szotkowski

  • Moderator
  • I live on this forum
  • *****
  • Posts: 1497
  • Karma: 57
Re: Out of memory errors when $drupal_root is correct in civicrm.settings.php
August 14, 2009, 12:39:43 am
Quote from: jerrygarciuh on August 13, 2009, 07:41:47 am
Thanks for the reply Piotr, I upped exec time to 60 seconds and memory to 128M and stopped and started httpd but the symptom remains the same.

The same as in ‘Allowed memory size of 67108864 bytes exhausted’, or the same as in ‘Allowed memory size of 134217728 bytes exhausted’?

The former would mean that you didn’t really up the memory limit in the right place; the latter would mean that there’s something really strange, as CiviCRM by itself should definitely fit in 64 MiB of memory…
If you found the above helpful, please consider helping us in return – you can even steer CiviCRM’s future and help us extend CiviCRM in ways useful to you.

jerrygarciuh

  • Guest
Re: Out of memory errors when $drupal_root is correct in civicrm.settings.php
August 14, 2009, 05:06:54 am
Hi Piotr,  as of this morning my masters have decided to abandon CiviCRM and I have disabled the modules.  All is functioning well.

I am much obliged for the replies!

David

Donald Lobo

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 15963
  • Karma: 470
    • CiviCRM site
  • CiviCRM version: 4.2+
  • CMS version: Drupal 7, Joomla 2.5+
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: Out of memory errors when $drupal_root is correct in civicrm.settings.php
August 14, 2009, 05:50:01 am

can you give us more details on what factors influenced the decision and why etc. that will help us improve the project for future folks

lobo
A new CiviCRM Q&A resource needs YOUR help to get started. Visit our StackExchange proposed site, sign up and vote on 5 questions

jerrygarciuh

  • Guest
Re: Out of memory errors when $drupal_root is correct in civicrm.settings.php
August 14, 2009, 06:50:14 am
Well the short version is that they have used custom solutions for years and had been convinced by a California firm to ditch their custom solutions for a Drupal/CiviCRM/UberCart site.  In the end it was the classic problem of the sales guys saying "Of course we can do that" and the techs saysing "You promised them what!?"

When it came to crunch time the dev company just started refusing to respond to emails and ignored or quibbled about the list of deliverables.

Devs got fired and I got the site on a disc.  Without the devs to do the migration and training they decided to stick with the custom CRM amalgam they have.

Also, having nothing to go on but out of memory errors in the logs put us in a bad spot for debugging and when it became obvious that everything worked just fine in the rest of the site with only the settings.php edits it became a choice between paying for debugging in the dark for CiviCRM or disabling it and moving on.

I really do appreciate the time you guys took trying to help me out.

Peace

David


Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Installing CiviCRM »
  • Drupal Installations (Moderator: Piotr Szotkowski) »
  • Out of memory errors when $drupal_root is correct in civicrm.settings.php

This forum was archived on 2017-11-26.