# Search is busted again

**URL:** <https://boards.straightdope.com/t/search-is-busted-again/634382>\
**Category:** About This Message Board\
**Created:** [September 11, 2012, 8:24am UTC](https://boards.straightdope.com/t/search-is-busted-again/634382 "2012-09-11T08:24:49Z")\
**Posts on this page:** 18\
**Page:** 1

<div class="post-metadata">

**Author:** ![spinky](https://avatars.discourse-cdn.com/v4/letter/s/59ef9b/32.png) [@spinky](https://boards.straightdope.com/u/spinky)\
**Post date:** [September 11, 2012, 8:24am UTC](https://boards.straightdope.com/t/search-is-busted-again/634382/1 "2012-09-11T08:24:49Z")

</div>

Looks like PHP is running out of memory. Here’s the error, which is the only text on a plain white page:

```auto

Fatal error: Allowed memory size of 536870912 bytes exhausted (tried to allocate 71 bytes) in /home/straightdope/boards.straightdope.com/sdmb/search.php on line 1151

```

---

<div class="post-metadata">

**Author:** ![Digital\_is\_the\_new\_Analog](https://avatars.discourse-cdn.com/v4/letter/d/a88e4f/32.png) [@Digital\_is\_the\_new\_Analog](https://boards.straightdope.com/u/Digital_is_the_new_Analog)\
**Post date:** [September 12, 2012, 3:14am UTC](https://boards.straightdope.com/t/search-is-busted-again/634382/2 "2012-09-12T03:14:51Z")

</div>

> [@spinky](#):
>
> Looks like PHP is running out of memory. Here’s the error, which is the only text on a plain white page:
> 
> ```auto
> 
> Fatal error: Allowed memory size of 536870912 bytes exhausted (tried to allocate 71 bytes) in /home/straightdope/boards.straightdope.com/sdmb/search.php on line 1151
> 
> ```

71 bytes! We can’t afford 71 bytes!

I mean…can you imagine what someone would do with 71 bytes?  
-D/a

---

<div class="post-metadata">

**Author:** ![spinky](https://avatars.discourse-cdn.com/v4/letter/s/59ef9b/32.png) [@spinky](https://boards.straightdope.com/u/spinky)\
**Post date:** [September 12, 2012, 3:47am UTC](https://boards.straightdope.com/t/search-is-busted-again/634382/3 "2012-09-12T03:47:36Z")

</div>

BTW, I noticed this doesn’t actually happen 100% of the time, but it does always happen with the same search terms. For example, if you go to advanced search and put the words “years behind” in the keywords box and then choose “show results as posts” at the bottom and hit submit, it always happens. I have seen other two word searches that work. Presumably, the number of posts containing each individual keyword chosen is a factor.

---

<div class="post-metadata">

**Author:** ![Autolycus](https://avatars.discourse-cdn.com/v4/letter/a/22d042/32.png) [@Autolycus](https://boards.straightdope.com/u/Autolycus)\
**Post date:** [September 12, 2012, 5:44am UTC](https://boards.straightdope.com/t/search-is-busted-again/634382/4 "2012-09-12T05:44:00Z")

</div>

I told you. I already killed that hamster.

---

<div class="post-metadata">

**Author:** ![TubaDiva](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/tubadiva/32/507_2.png) [@TubaDiva](https://boards.straightdope.com/u/TubaDiva)\
**Post date:** [September 12, 2012, 2:00pm UTC](https://boards.straightdope.com/t/search-is-busted-again/634382/5 "2012-09-12T14:00:38Z")

</div>

When you see that message it means the system is so swamped with requests that it’s dropping some … it will always favor reading/writing posts over everything else and will drop sending email and searches.

Sorry about that.

You’ll always do better using Google for your searches anyway.

[HOWTO: Search the SDMB using Google](http://boards.straightdope.com/sdmb/showthread.php?t=638051)

---

<div class="post-metadata">

**Author:** ![spinky](https://avatars.discourse-cdn.com/v4/letter/s/59ef9b/32.png) [@spinky](https://boards.straightdope.com/u/spinky)\
**Post date:** [September 12, 2012, 5:36pm UTC](https://boards.straightdope.com/t/search-is-busted-again/634382/6 "2012-09-12T17:36:04Z")

</div>

> [@TubaDiva](#):
>
> You’ll always do better using Google for your searches anyway.

This is wrong, and is a cop-out. As an example, please show me how to use Google for the simple task of finding posts where TubaDiva used the word “Google”. There is a reason sites have their own search engines instead of just falling back on the lazy answer of “use google,” and it’s that your site has much more insight into the **meaning** of certain pieces of information and can use that to improve search results, whereas Google can’t see posts, usernames, dates, forum names, etc. It just sees all those things as text on a page.

---

<div class="post-metadata">

**Author:** ![TubaDiva](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/tubadiva/32/507_2.png) [@TubaDiva](https://boards.straightdope.com/u/TubaDiva)\
**Post date:** [September 12, 2012, 5:44pm UTC](https://boards.straightdope.com/t/search-is-busted-again/634382/7 "2012-09-12T17:44:31Z")

</div>

Did you even look at the link?

The search function built into vbulletin is awful.

Using Google – as shown to you in the hyperlink – is faster and much more efficient.

It works.

[http://boards.straightdope.com/sdmb/showthread.php?t=638051](http://boards.straightdope.com/sdmb/showthread.php?t=638051)

Look at the link.

---

<div class="post-metadata">

**Author:** ![spinky](https://avatars.discourse-cdn.com/v4/letter/s/59ef9b/32.png) [@spinky](https://boards.straightdope.com/u/spinky)\
**Post date:** [September 12, 2012, 6:46pm UTC](https://boards.straightdope.com/t/search-is-busted-again/634382/8 "2012-09-12T18:46:24Z")

</div>

> [@TubaDiva](#):
>
> Did you even look at the link?

Is something wrong with you?

From the link: “Note that its not possible to find all posts by QED that mention gas.”

---

<div class="post-metadata">

**Author:** ![Irishman](https://avatars.discourse-cdn.com/v4/letter/i/b487fb/32.png) [@Irishman](https://boards.straightdope.com/u/Irishman)\
**Post date:** [September 12, 2012, 7:02pm UTC](https://boards.straightdope.com/t/search-is-busted-again/634382/9 "2012-09-12T19:02:59Z")

</div>

Yes, but the SDMB search function won’t find all posts by QED that mention gas, either. Gas is a three letter word, too small for the search engine.

---

<div class="post-metadata">

**Author:** ![spinky](https://avatars.discourse-cdn.com/v4/letter/s/59ef9b/32.png) [@spinky](https://boards.straightdope.com/u/spinky)\
**Post date:** [September 12, 2012, 7:28pm UTC](https://boards.straightdope.com/t/search-is-busted-again/634382/10 "2012-09-12T19:28:01Z")

</div>

> [@Irishman](#):
>
> Yes, but the SDMB search function won’t find all posts by QED that mention gas, either. Gas is a three letter word, too small for the search engine.

Hence my other example: all posts where TubaDiva says “Google.” How another one: threads started by TubaDiva.

---

<div class="post-metadata">

**Author:** ![samclem](https://avatars.discourse-cdn.com/v4/letter/s/a9a28c/32.png) [@samclem](https://boards.straightdope.com/u/samclem)\
**Post date:** [September 12, 2012, 10:46pm UTC](https://boards.straightdope.com/t/search-is-busted-again/634382/11 "2012-09-12T22:46:58Z")

</div>

> [@spinky](#):
>
> BTW, I noticed this doesn’t actually happen 100% of the time, but it does always happen with the same search terms. For example, if you go to advanced search and put the words “years behind” in the keywords box and then choose “show results as posts” at the bottom and hit submit, it always happens. I have seen other two word searches that work. Presumably, the number of posts containing each individual keyword chosen is a factor.

The search engine we have with vB has been like this ever since I’ve been around. There’s no way around it, and it’s a “feature” rather than a bug. 😃

If you have an idea of how vB can make this better, drop them a line.

---

<div class="post-metadata">

**Author:** ![Snerky\_Snerk](https://avatars.discourse-cdn.com/v4/letter/s/6bbea6/32.png) [@Snerky\_Snerk](https://boards.straightdope.com/u/Snerky_Snerk)\
**Post date:** [September 13, 2012, 1:20am UTC](https://boards.straightdope.com/t/search-is-busted-again/634382/12 "2012-09-13T01:20:17Z")

</div>

I know nothing about php and web servers, so I googled.

There are quite a few results for that type of error.

At least one seemed to have a fix - [Link to thread at Unix.com](http://www.unix.com/web-programming/147642-solved-php-fatal-error-allowed-memory-size-134217728-bytes-exhausted.html)

Exact same problem? I don’t know.

Anyone at SDMB who could try the fix? I don’t know.

---

<div class="post-metadata">

**Author:** ![Snerky\_Snerk](https://avatars.discourse-cdn.com/v4/letter/s/6bbea6/32.png) [@Snerky\_Snerk](https://boards.straightdope.com/u/Snerky_Snerk)\
**Post date:** [September 13, 2012, 1:25am UTC](https://boards.straightdope.com/t/search-is-busted-again/634382/13 "2012-09-13T01:25:48Z")

</div>

> [@Autolycus](#):
>
> I told you. I already killed that hamster.

Run out of gerbils, did you?

---

<div class="post-metadata">

**Author:** ![spinky](https://avatars.discourse-cdn.com/v4/letter/s/59ef9b/32.png) [@spinky](https://boards.straightdope.com/u/spinky)\
**Post date:** [September 13, 2012, 5:24am UTC](https://boards.straightdope.com/t/search-is-busted-again/634382/14 "2012-09-13T05:24:46Z")

</div>

> [@samclem](#):
>
> The search engine we have with vB has been like this ever since I’ve been around. There’s no way around it, and it’s a “feature” rather than a bug. 😃
> 
> If you have an idea of how vB can make this better, drop them a line.

The error means PHP is running out of memory. This is a configurable setting and not a vB issue. It may be that you can’t increase the setting because you don’t have enough RAM on your web server. This is also not vB’s fault.

---

<div class="post-metadata">

**Author:** ![Zeriel](https://avatars.discourse-cdn.com/v4/letter/z/58956e/32.png) [@Zeriel](https://boards.straightdope.com/u/Zeriel)\
**Post date:** [September 13, 2012, 4:23pm UTC](https://boards.straightdope.com/t/search-is-busted-again/634382/15 "2012-09-13T16:23:34Z")

</div>

I concur–this is a setup/admin issue with your webserver rather than a vB error.

–Zeriel, among my other hats I administer a vB4 forum.

---

<div class="post-metadata">

**Author:** ![MeanOldLady](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/meanoldlady/32/10737_2.png) [@MeanOldLady](https://boards.straightdope.com/u/MeanOldLady)\
**Post date:** [September 13, 2012, 6:36pm UTC](https://boards.straightdope.com/t/search-is-busted-again/634382/16 "2012-09-13T18:36:44Z")

</div>

> [@spinky](#):
>
> This is wrong, and is a cop-out. As an example, please show me how to use Google for the simple task of finding posts where TubaDiva used the word “Google”. There is a reason sites have their own search engines instead of just falling back on the lazy answer of “use google,” and it’s that your site has much more insight into the **meaning** of certain pieces of information and can use that to improve search results, whereas Google can’t see posts, usernames, dates, forum names, etc. It just sees all those things as text on a page.

This has always been what ground my gears about the automatic “Google!” response to our shitacular search function. First, it’s silly to instruct people to use another website so that they can make good use of this one, but moreover, the fix they offer up is a pretty bad one. I’ve just learned to live with never having a useful search function on this board, and only being able to Google in very limited cases. Feh.

---

<div class="post-metadata">

**Author:** ![Crazyhorse](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/crazyhorse/32/31_2.png) [@Crazyhorse](https://boards.straightdope.com/u/Crazyhorse)\
**Post date:** [September 13, 2012, 8:51pm UTC](https://boards.straightdope.com/t/search-is-busted-again/634382/17 "2012-09-13T20:51:13Z")

</div>

From the error it appears that PHP is being given 512MB of RAM on the server. That is actually quite a lot for PHP but there are quite a lot of messages on the boards. I think the error happens on searches that return too many results. If increasing the memory allocation isn’t an option, reducing the possible number of found posts might also help from the other end of the problem:

Admin CP -\> vBulletin Options -\> Message Searching Options -\> Maximum Search Results to Return

Setting that to a lower number and/or increasing the memory allocation to PHP should allow more searches to succeed without the error.

---

<div class="post-metadata">

**Author:** ![Crazyhorse](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/crazyhorse/32/31_2.png) [@Crazyhorse](https://boards.straightdope.com/u/Crazyhorse)\
**Post date:** [September 13, 2012, 10:10pm UTC](https://boards.straightdope.com/t/search-is-busted-again/634382/18 "2012-09-13T22:10:08Z")

</div>

> [@samclem](#):
>
> The search engine we have with vB has been like this ever since I’ve been around. There’s no way around it, and it’s a “feature” rather than a bug. 😃
> 
> If you have an idea of how vB can make this better, drop them a line.

> [@spinky](#):
>
> The error means PHP is running out of memory. This is a configurable setting and not a vB issue. It may be that you can’t increase the setting because you don’t have enough RAM on your web server. This is also not vB’s fault.

> [@Zeriel](#):
>
> I concur–this is a setup/admin issue with your webserver rather than a vB error.
> 
> –Zeriel, among my other hats I administer a vB4 forum.

I just noticed the SDMB is running vBulletin version 3.73.

A PHP memory overrun bug during searches appears to have been fixed in [version 3.84](https://www.vbulletin.com/forum/showthread.php/315188-vBulletin-3-8-4-Released?p=1772897#post1772897)

> [@](#):
>
> 3.8.4 also addresses an issue with vbchop() causing PHP memory to hit memory\_limit with very very very long posts filled with special entities on some non-standard configurations.

I don’t know if this was the specific bug in question here, but since then there have been many more updates, an entire version 4, 4.x, and the current version of vBulletin is version 5.

If this is caused by a bug or limitation in vB and isn’t just a simple question of not enough memory for the number of results returned, chances are the bug was fixed a long time ago.
