PassMark Logo
Home » Forum

Announcement

Collapse
No announcement yet.

Memory error PHP bytes exhausted

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

  • Memory error PHP bytes exhausted

    My dedicated server moved to a new host with a new and faster machine with 4gb memory. They transferred everything from the old machine to the new via WHM's transfer utility.

    It looks like the new server uses PHP5.

    We now get this error on a blank page after any searches:

    Fatal error: Allowed memory size of 33554432 bytes exhausted (tried to allocate 24 bytes) in /home/twoway/public_html/ggsearch/search.php on line 1536

    We are using Zoom Search Engine 6.0 (29/April/2009).

  • #2
    See this FAQ
    Q. "Fatal error: Allowed memory size of 8388608 bytes exhausted..." or similar error message

    Comment


    • #3
      Since this memory error happened late on a Saturday night (Australian time) we decided to try and fix it ourselves rather than wait for your reply to my post. My new host's support staff tried various things, including raising the memory. They got to 128mb and it still didn't work, so in a "what the hell" effort they doubled it to 256mb and ZOOM finally worked.

      Your FAQ states to raise PHP's memory limit to 64mb and if it doesn't work, to then try 128mb. For anyone reading this with a similar problem, the Note at the end of your FAQ points out that some servers may require a higher limit. In our case 256mb was the sweet spot.

      Comment


      • #4
        It is worth noting that PHP itself has increased memory usage in more recent versions. That is, the same script running on PHP 5 is known to use more memory than the same script running on PHP 4. This contributes in part to the increased memory requirements.
        --Ray
        Wrensoft Web Software
        Sydney, Australia
        Zoom Search Engine

        Comment


        • #5
          Your index must be fairly large to require this much RAM. If the index is large, you might want to consider the CGI option instead. Search times will be faster and memory usage will be less.

          Comment


          • #6
            When you say the index might be large, what kind of specific size do you mean?

            On the site itself, the ZOOM-related file sizes include:

            zoom_pagetext.zdat - 25mb
            zoom_wordmap.zdat - 18mb
            zoom_pagedata.zdat - 2mb
            zoom_dictionary.zdat - 1.5mb

            The other files are all in kilobytes. The site that's indexed has about 10,000 static html files. Most of those files have some PHP include statements. We also have a stats script that's PHP based.

            As I mentioned before, our old server had only 2gb of memory but it may have used PHP4. Everything worked so I didn't pay attention to the version or the memory limit.

            The new server has 4gb of memory and PHP5. Assigning a memory limit of 256mb doesn't appear to be a problem.

            Comment


            • #7
              Yes, if you have 4GB, then 256MB isn't much.
              I would call 10,000 pages a moderately large site. So 256MB with PHP5 is probably about right.

              Again, if you find it slow one day, consider the CGI option.

              Comment


              • #8
                I tried everything in the FAQ including changing the php limit to 128mb which I thought would be zillions since Wordpress, for instance, requires only about 38mb; but the same error came back on different sites. The cure (hopefully) is increasing the limit in php to 256M. I have php5.2 something and 4 gigs ram.

                Increase Memory Limit
                In the WHM host control panel, go to Service Configuration > PHP Configuration Editor.

                Comment


                • #9
                  There are cases of Wordpress needing more than 256MB a well.
                  http://wordpress.org/support/topic/wp3-exeed-256-memory-limit

                  Comment

                  Working...
                  X