DiscusWare, LLC.
Download Purchase Contact Us
Home
Support Home Documentation Knowledge Base Support Forums Support Request Advanced Services
"Out of Memory" error message (possibly Internal Server Error)

Explanation of the conditions which may produce an Out of Memory error.
Support Site Search
 

On some systems, certain operations of the Discus program may cause an "Out of Memory" condition. This generally shows up as an Internal Server Error message and records an "Out of Memory" message in the server's error log. Occasionally, the words "Out of Memory" are printed to the screen.

Version 3.01-specific

If you have version 3.01 or before and you receive this message, you need to upgrade to Discus 3.10 (and then to the currently supported software version). There have been substantial improvements in version 3.10 to the efficiency of the program, making it less memory-intensive. Specific areas of improvement are keyword search, new message search, and tree view, as well as the administrative functions of previewing and saving the board appearance, changing posting privileges, and generating a tree for moving messages and subtopics.

Version 3.10-specific

If you have version 3.10, the most commonly reported operation where this error occurs is the upgrade procedure from version 3.01 to 3.10, where the system regenerates your pages. This error has been reported and traced to an instance where the program is attempting to upgrade a very large page, possibly one with 100 or more messages, that therefore has a file size of several hundred kilobytes.

General Notes

It is virtually certain that your server is not actually running out of memory. Even a modestly equipped web host server is probably running, at bare minimum, 128 MB of RAM, and more likely several times that amount. However, certain servers artificially limit the amount of RAM that a CGI process can use, some as low as 1 MB. If you receive this error with version 3.10 or higher, your web host probably has such a limit.

If you regularly experience this error message, the first thing we suggest you do is to write to your web host and ask them what their memory limitation policy is. Unfortunately, many web hosts are less than honest about their memory limitation policies because they don't want to lose your business. So if they simply don't respond within a reasonable period of time (sadly, that is the condition with many of today's web hosts), we have developed a test script to allow you to see for yourself where the execution of a script gets cut off.

#!/usr/bin/perl
$| = 1;
print "Content-type: text/html\n\n";
print "Memory/Resource Test<BR>\n";
print "Number is the amount of memory used<BR>\n";
print "If you don't see 'Completed Test!' at the bottom, the test failed<P><HR>\n";
for ($i = 100000; $i <= 8000000; $i += 100000) {
        $x = " " x $i;
        print "-";
        print "| $i ; Time (secs): ", (time - $^T), "<BR>\n" if $i % 1000000 == 0;
}
print "Completed Test!\n";
exit(0);

Our instructions for this script are as follows:

  1. Copy the text of the script to the clipboard and paste it into a plain text editor like Notepad.

  2. Make sure the path to Perl on the first line of the script matches that on the first line of your Discus scripts. Make sure also that the #! is all the way to the left (no spaces before it) and that the line starting with #! is the first line of the file (no blank lines before it).

  3. Save the file as "memtest.cgi" with your text editor.

  4. Upload the file in ASCII mode to your cgi-bin directory (or equivalent). Set permissions on the file to 0755 (rwxr-xr-x).

  5. Access the file at http://your.server.com/cgi-bin/memtest.cgi (or equivalent URL) and view the output. The script will attempt to use up to 8,000,000 bytes of memory (approximately 8 MB) and will print out its progress along the way, along with the time it took it to get to that point. If it does not run to completion, your web host is terminating the script based on memory, resource consumption, or running time.

Our support policy for this script is as follows:

DiscusWare does not provide any support whatsoever for the script above. Any requests for support will be silently ignored by our support division. Here's our general guide:

Internal Server Error: The path to Perl is wrong or you didn't upload in ASCII mode.

File Not Found: You're using the wrong URL to access the script. Try another.

Forbidden: You didn't set the permissions properly on the script.

Displays as text: You didn't put it in your cgi-bin directory, or perhaps you need to name it "memtest.pl" to have it executed, especially on Windows.

If the above test indicates that your server limits the memory of a process, you have two options. One is to ask your current web host to increase the amount of memory they allow a CGI script to consume to a more reasonable limit. This is probably a pointless venture if they deny in the first place that such a limit exists. Your other option is to switch web hosts. As you are searching for a new home, you should ask prospective hosts about their policy for limitation of memory, resources, and time that a script can consume.


Download Purchase Contact Us
Privacy Policy
Copyright © 2005, DiscusWare, LLC, All Rights Reserved