Announcement

Collapse
No announcement yet.

Error on searches

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Error on searches

    A few of my users are reporting that they are receiving an error message when performing long text searches, the following text appears.

    Fatal error: Allowed memory size of 8388608 bytes exhausted (tried to allocate 16 bytes) in /path/to/forums/search.php on line 870
    I see that the byte count is 8MB, how do I alter the allowed memory size for searches.

    This problem only seems to of appeared after upgrading my PHP version to v5.2.2

  • #2
    Thats a very low php memory limit, as the default in 5.2 should be 16MB

    You need to edit your php.ini and edit the memory_limit option.

    Comment


    • #3
      Thanks Zachery, where do I find the php.ini file

      Comment


      • #4
        Thats a pretty loaded question, what is your OS?

        For linux:
        locate php.ini
        find php.ini

        Windows
        Start > Search > php.ini

        Comment


        • #5
          It's a linux box.

          I found one in usr/local/lib which contained the line:-
          memory_limit = 8M ; Maximum amount of memory a script may consume (8MB)

          I changed it to:-
          memory_limit = 16M ; Maximum amount of memory a script may consume (16MB)
          But still get the error, do I need to reboot the box for the new settings to work?

          Comment


          • #6
            Originally posted by Bat21 View Post
            do I need to reboot the box for the new settings to work?
            You need to restart Apache. E.g.

            Code:
            # /etc/init.d/apache restart
            "The lurking suspicion that something could be simplified is the world's richest source of rewarding challenges"
            - Edsger Dijkstra

            Comment


            • #7
              Nice one René, all works fine now

              Comment


              • #8
                I hade the exact same problem and used the exact same
                php.ini edit solution. Gotta love that search function!

                Thanks for the help renep, Zachery & Bat21!

                Comment


                • #9
                  Hi

                  Thought i'd hijack this thread for a similar question. Basically i'm wondering what you should set your php memory limit to. Some text searches my users try to perform run out of memory even when i have the limit set to 16MB.

                  I'm using 24MB now and the machine has 1GB in RAM and is barely swapping anything so far. What is a good limit for boards of about 49 290 threads and 835 558 posts? Is it possible for me to ask for opinions from other users with similar boards here? Would be great to get some feedback.

                  Comment

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