Trying to navigate to "Configure general search settings and see indexing status" or to edit main search option in Drupal 6 yields an out of memory error. And this site is fairly robust memory-wise with over 120 megs of RAM dedicated.

Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 1048576 bytes) in /sites/all/modules/search_by_page/search_by_page.module on line 117

It looks like I cannot use Search By Page unless I up my RAM. How much RAM is required?

Comments

jhodgdon’s picture

Category:bug» support
Status:Active» Fixed

Well, I personally have never had much success running a Drupal 6 or 7 site with Views, CCK, and other modules (along with maybe Search by Page) with less than about 256M allocated as the PHP memory limit. Drupal is pretty memory intensive.

I don't think Search by Page itself is probably using up a huge amount of memory -- it's probably just the proverbial "straw that broke the camel's back" -- in other words, you were probably pretty close to the memory limit on your site before you enabled Search by Page, and SBP kicked you over the limit.

mcfilms’s picture

Yes this particular site is running on a shared hosting site to stay on a slim budget. But I spoke to the hosting provider and the bumped the RAM up to 128MB to 160MB. I confirmed this in my status report section.

So although originally the module was telling me it was a little over a megabyte short to change to the configuration page, my environment now had 32 megs more.

But when I try and work with the module I now get:

Fatal error: Allowed memory size of 167772160 bytes exhausted (tried to allocate 71 bytes) in /home/onticcom/public_html/sites/all/modules/search_by_page/search_by_page.module on line 147

I sort of feel like I could be chasing this illusive memory size for quite a while. I guess my next step would be to spin up another copy of the environment and allocate it gobs of memory and see if that works.

But I do find it interesting that the module went from needing another megabyte of memory to needing over 32 megs with no other changes.

jhodgdon’s picture

You are misinterpreting the error message. When your memory size is X, the error message will report "Allowed memory size of X is exhausted" at the moment when the extra memory is needed. It doesn't tell you the total amount that it needs to complete the operation.

That said, the configuration page does use some significant memory when it tries to figure out the indexing status. That could probably be fixed in the module; however, during cron runs the full operation (the one that the configuration page is currently doing) will need to be done, so if you cannot access the admin page the way it is currently set up, you probably wouldn't have enough memory for the cron runs either if I changed the code so that the full operation was only done on the cron run and not the configuration page.

So... probably your site has a lot of content that would have to be indexed and maybe Search by Page will not be the best choice? For a large site, you probably need Solr.

mcfilms’s picture

Okay thank you for the information. I appreciate it. Your note gave me precisely the clue I needed to get past this.

The site is not _that_ large, less than 30 pages. However there is a content type called "part" that has 150,000 nodes. I simply unchecked this from the Environment's "Content types to index" and was able to index without a memory error.

Thanks!

jhodgdon’s picture

Yes, that would do it! Sorry for not thinking of that in comment #1. Glad it is cleared up for you.

Status:Fixed» Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.