Fatal error: Allowed memory size of 16777216 bytes exhausted

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • DeeperImage
    Senior Member
    • Nov 2001
    • 221

    Fatal error: Allowed memory size of 16777216 bytes exhausted

    Fatal error: Allowed memory size of 16777216 bytes exhausted (tried to allocate 35 bytes) in /home/******/public_html/forums/includes/functions_search.php on line 196

    My members are getting this message when they type a long thread title, and certain words. For example if I use the word CAR in the thread title, this happens, or if the name is long.

    I looked at the sticky thread http://www.vbulletin.com/forum/showthread.php?t=274911 but my message is different in the sense that line 196 contains this

    $wordlists[$post['postid']] .= " ,$post[wordid],";
    and not the Hook message to look for pluggins. Even if I disable all my pluggins (tried that already, they are back on) this happens. I have also already uppped my memory limit in php.ini to 16MB from 8MB. Any suggestions?

    I am on (vBulletin 3.7.1 Patch Level 2). VBulletin has made it really difficult to personalize your site which is another topic for another time. Since we have to revert everything back in order for it to work, but then it just looks like everyone elses website. It is not pluggin or customization friendly anymore.
    Cobbcountyforums.com
  • Wayne Luke
    vBulletin Technical Support Lead
    • Aug 2000
    • 73977

    #2
    PHP is running out of memory. Add this line to your config.php file under <?php:
    Code:
    ini_set('memory_limit', 32 * 1024 * 1024);
    Translations provided by Google.

    Wayne Luke
    The Rabid Badger - a vBulletin Cloud demonstration site.
    vBulletin 5 API

    Comment

    • DeeperImage
      Senior Member
      • Nov 2001
      • 221

      #3
      Originally posted by Wayne Luke
      PHP is running out of memory. Add this line to your config.php file under <?php:
      Code:
      ini_set('memory_limit', 32 * 1024 * 1024);

      I tried that, and now I get this one
      Fatal error: Allowed memory size of 33554432 bytes exhausted (tried to allocate 35 bytes) in /home/********/public_html/forums/includes/functions_search.php on line 196
      Cobbcountyforums.com

      Comment

      • Steve Machol
        Former Customer Support Manager
        • Jul 2000
        • 154488

        #4
        32M should be more than enough assuming you have not installed any add-ons. Try lowering this setting:

        Admin CP -> vBulletin Options -> Message Searching Options -> Maximum Search Results to Return
        Steve Machol, former vBulletin Customer Support Manager (and NOT retired!)
        Change CKEditor Colors to Match Style (for 4.1.4 and above)

        Steve Machol Photography


        Mankind is the only creature smart enough to know its own history, and dumb enough to ignore it.


        Comment

        • DeeperImage
          Senior Member
          • Nov 2001
          • 221

          #5
          Originally posted by Steve Machol
          32M should be more than enough assuming you have not installed any add-ons. Try lowering this setting:

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

          Steve,

          That number was indeed pretty high, I have turned it down and it seems to partially work. If I use the word "car" in a long thread title, this error appears, if I try the same long thread title without the word "car" in there it now works. Thanks for the help.

          Fatal error: Allowed memory size of 33554432 bytes exhausted (tried to allocate 16 bytes) in /home/********/public_html/forums/includes/class_core.php on line 3274
          Cobbcountyforums.com

          Comment

          • PhilMcKrackon
            New Member
            • Apr 2008
            • 18
            • 3.8.x

            #6
            I had similar problems on my forums. Does your host allow you to configure PHP via a php.ini file?

            I was able to modify my php memory limit by adding this to a php.ini file in my forum home.
            Code:
            [php]
            memory_limit = 16M
            Of course you can alter the memory limit if needed.
            Jeep-CJ.com

            Comment

            • DeeperImage
              Senior Member
              • Nov 2001
              • 221

              #7
              Originally posted by PhilMcKrackon
              I had similar problems on my forums. Does your host allow you to configure PHP via a php.ini file?

              I was able to modify my php memory limit by adding this to a php.ini file in my forum home.
              Code:
              [php]
              memory_limit = 16M
              Of course you can alter the memory limit if needed.
              Phil,

              Thanks for the info but I believe I've already changed that to 32MB. At least according to my phpinfo page.
              Cobbcountyforums.com

              Comment

              • PhilMcKrackon
                New Member
                • Apr 2008
                • 18
                • 3.8.x

                #8
                Originally posted by DeeperImage
                Phil,

                Thanks for the info but I believe I've already changed that to 32MB. At least according to my phpinfo page.
                No problem.
                BTW - Even though I had added the php.ini file to my forum home my admin panel still showed 8mb. I had to add the php.ini file to each directory php files were executed from. Once I added the php.ini file to forums/admincp/ my admin panel showd 16mb. You host may be different.
                Jeep-CJ.com

                Comment

                • futureye
                  Member
                  • Jan 2004
                  • 70
                  • 4.0.0

                  #9
                  Originally posted by Wayne Luke
                  PHP is running out of memory. Add this line to your config.php file under <?php:
                  Code:
                  ini_set('memory_limit', 32 * 1024 * 1024);
                  I have used this oneworks fine1Q: Is there a problem if I incease it to 64mb?

                  Comment

                  • Steve Machol
                    Former Customer Support Manager
                    • Jul 2000
                    • 154488

                    #10
                    There should be no problem with that.
                    Steve Machol, former vBulletin Customer Support Manager (and NOT retired!)
                    Change CKEditor Colors to Match Style (for 4.1.4 and above)

                    Steve Machol Photography


                    Mankind is the only creature smart enough to know its own history, and dumb enough to ignore it.


                    Comment

                    • alfisti.net
                      Member
                      • Aug 2001
                      • 61
                      • 3.8.x

                      #11
                      Hi Steve,

                      I have the same problem (since the update from 3.6 to 3.71 or very close to this update).

                      I don't understand why the error comes with "tried to allocate 35 bytes". 35 bytes are nothing!?

                      I have three different errors:
                      - white screen without any message.
                      - Allowed memory size of 52428800 bytes exhausted (tried to allocate 35 bytes) in ... /includes/functions_search.php on line 197
                      - sometimes in /includes/class_core.php (I don't have the line).

                      I reduced the "Maximum Search Results to Return"-setting from 500 to 100 but it took no effect (maybe more often a white screen, I ' am not sure).

                      At the beginning we have had this problem only with very very long titles in combination with a lot of short words. But now we have the problem also with shorter titles like:
                      "Wie könnt ihr euch einen neuen Alfa leisten?"

                      First I thought it was a problem of the Hack: "search for similar thread titles" but after uninstalled this hack and after I deleted the jquery.js file from the clientscript folder I have still the same problem.

                      Has someone else with the same problem also installed vBSEO or vBadavanced?

                      What can I do now to solve the problem?

                      Thanks
                      André

                      Comment

                      • alfisti.net
                        Member
                        • Aug 2001
                        • 61
                        • 3.8.x

                        #12
                        I tested a little bit and now it works with setting the option "Automatic Similar Thread Search" (under AdminCP > Message Searching Options) to NO.

                        hmmm... I want this option (with the similar thread titel hack), what can I do

                        Comment

                        • Wayne Luke
                          vBulletin Technical Support Lead
                          • Aug 2000
                          • 73977

                          #13
                          Originally posted by alfisti.net
                          I tested a little bit and now it works with setting the option "Automatic Similar Thread Search" (under AdminCP > Message Searching Options) to NO.

                          hmmm... I want this option (with the similar thread titel hack), what can I do
                          Place the most common word(s) in the title in the bad words list so that is doesn't cause massive searches which eat your memory and cause this issue.

                          vBulletin Options -> vBulletin Options -> Message Searching Options -> Words to be Excluded from Search
                          Translations provided by Google.

                          Wayne Luke
                          The Rabid Badger - a vBulletin Cloud demonstration site.
                          vBulletin 5 API

                          Comment

                          • alfisti.net
                            Member
                            • Aug 2001
                            • 61
                            • 3.8.x

                            #14
                            Thank you Wayne

                            For all guys with the same problem:
                            I found a "stopword-list" on wikipedia (in english and german)

                            Comment

                            • al7or
                              New Member
                              • Jun 2005
                              • 28

                              #15
                              thank u i did this and added what u said

                              Comment

                              widgetinstance 262 (Related Topics) skipped due to lack of content & hide_module_if_empty option.
                              Working...