PassMark Logo
Home » Forum

Announcement

Collapse
No announcement yet.

PHP / CGI script returns no results on Apache RLimitMEM & RLimitCPU

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

  • wise_mike
    replied
    another server?

    Is there a way that I could host the search fiiles on another server that direct to my current server?

    Thanks

    Leave a comment:


  • David
    replied
    Yes. You make a file in Notepad called something like test.php, paste in the simple test script above, save it. Upload to your server and run the script.

    It should print a bunch of lines like,

    allocated memory for 5000 integers
    ...
    allocated memory for 2000000 integers
    End test loop


    If the last line, "End test loop", never prints out you have hit a server limit.

    ----
    David

    Leave a comment:


  • wise_mike
    replied
    Where?!

    Hi there

    Where do I put that code mentioned above? at which file? or as a new file or what?

    Thanks in advance

    Leave a comment:


  • David
    replied
    I glad it is working again, becuase to be honest, I was a bit confused by the description of the problem.

    ------
    David

    Leave a comment:


  • hoosierwebdesign
    replied
    Update

    uninstalled/reinstalled and now it works again..

    Strange!

    Leave a comment:


  • hoosierwebdesign
    replied
    Thanks, The script helped me

    Thanks so much for the software (at a great price)
    After running the script and only getting allocated memory for 130000 integers, (On our dedicated server) I was able to look at the limites tab and noticed it had changed from the default of 1024kb to 10240kb.. That did not work

    So as we have the search running on 2 different parts of our site, I loaded the settings fromt he working search, and just changed the web folder.. reran the index and now I do get how many results it found but nothing listed under that.

    I now need to look into changing the limits but have no clue how to access the httpd.conf file.

    I am just not sure why it doesn't work on one part of the site but it does on the other... (php shopping cart side works, html old site does not(but did)



    Thanks again for the professional and quick reply to my email,
    Jason Miller

    Leave a comment:


  • David
    replied
    There are still a few people seeing this issue. So I wanted to post some additional details here.

    There are a number of cheap hosting companies that paid peanuts & employ monkeys to do support. These companies often deny there are any limits on their servers.

    This is a very simple script which should reach a count of 9,000,000. If it stops before this then the script's execution must have been terminated by something on the server. This would indicate that it is a problem independent of the Zoom search script.

    Code:
    <?php
    print("Begin test loop to allocate memory for 9,000,000 integers\n");
    for ($i = 0; $i < 9000000; $i++)
    {
        $dict[$i] = $i;    
        if ($i % 5000 == 0)
            print ("allocated memory for " . $i . " integers. ");
    }
    print("End test loop\n");
    ?>
    This can help you prove to the monkey that there is a limit on their servers.

    EDIT: Previously this script counted to 2,000,000. But we edited this post a couple of years after it was written, and increased it to 9,000,000 to simulate heavier RAM and CPU usage.

    ----
    David
    Last edited by David; May-09-2009, 10:18 PM. Reason: Fixing line wraps which broke the example code & increase count from 2M to 9M

    Leave a comment:


  • Anonymous
    replied
    "So I assume that you have now fixed your problem becuase it seems to be working fine?"

    Well, so it is!

    It wasn't working this morning, but I guess my server company figured out the problem.

    Thanks for checking it out anyway; greatly appreciated.

    Regards, Joe Everett

    Leave a comment:


  • David
    replied
    I just went to your web site and did a search,

    http://www.tbaptist.com/zoom/search.php?zoom_query=bible

    387 results were found and displayed correctly.

    So I assume that you have now fixed your problem becuase it seems to be working fine?

    --------
    David

    Leave a comment:


  • Joe Everett
    replied
    Still having this problem.

    Joe Everett
    tbaptist.com

    I have this very problem where there are no search results posted on the search form.

    The search engine is working fine one day, and then a few days later it isn’t.

    There is no apparent problem with the search files. They have been uploaded more than once, but no change. The search engine (with these search files) works fine on my home computer using a server application.

    I showed the RLimitMEM and RLimitCPU posting to my server webmaster, but he says that cannot be the problem, that the server values are much more than enough.

    He says they are using this configuration (which, admittedly, means little to me):

    Dul 2.8 w/4 GB ram

    Fedora Core 2

    php 4.3.8

    I am using Zoom Professional 3.1, I think (I don’t have it here for checking); I bought it last May.

    The server webmaster suggested that I enable error-logging --- how do I do this, and will it help since there are no errors reported?

    He also suggested that the search-engine may not work with php 4.3.8.

    Any suggestions?

    Regards, Joe Everett

    Leave a comment:


  • PHP / CGI script returns no results on Apache RLimitMEM & RLimitCPU

    A note to Zoom users that use the PHP or CGI version of Zoom on servers that run Apache.

    Several users have reported a problem where they do a search and get no results. In some cases the search form is still displayed at the top of the page, in other cases you get a completely blank page.

    After investigation it seems that some shared hosting companies are severly limiting the amount of RAM and CPU available to PHP and CGI scripts.

    They can do this by setting the "RLimitMEM" & "RLimitCPU" directives in the Apache configuration for the server. Setting these values will cause Apache to kill any script after it uses more than a certain amount of RAM or CPU time.

    These values are normally set in the Apache httpd.conf file. (but can also appear in the srm.conf, access.conf and virtual host files)

    See,
    http://www.apacheref.com/ref/http_core/RLimitMEM.html
    http://www.apacheref.com/ref/http_core/RLimitCPU.html

    The timeout setting is also worth looking at.
    http://www.apacheref.com/ref/http_core/Timeout.html

    The solution is to get you hosting company to set reasonable limits for these values. Of course they might not like this becuase it means you are going to be using more of their CPU time and RAM.

    The larger your index files in Zoom, the higher these limits will need to be. Example limits for a medium sized site might be,
    RLimitMEM 32097152 32097152 #32 Meg of RAM
    RLimitCPU 20 60 #60 seconds of CPU time

    But before you start sending your hosting company nasty E-Mails check everthing else is correct.
    - Check the the indexing process was successful
    - Check that all files are on the server
    - Check that you can run other small PHP scripts.

    Note that if you have this problem, then there will be no error message of any sort, but you will see the search form. This is becuase the script was suddenly terminated. If you see an error message then these settings are probably not the cause of your problem.

    --------
    David
    Wrensoft

    Update: Oct 2005: If you are able to confirm with your hosting company that CPU run time is the problem and you are using PHP, then consider switching to the CGI option which will use less CPU time and give faster searching.
Working...
X