Home > Fluid Dynamics Search Engine > Help > 1162

Dealing with server timeouts and killed processes

The web server may kill any CGI process that uses too much time or too many resources. Each web server is configured with different threshold limits for time and CPU/memory resources.

How to detect a killed process

The server itself does not usually print any output to the screen when a process is killed. You will simply notice that the browser has stopped loading the page, and yet the page does not contain the complete output that you expected. Here is an example:

Example of partial output due to server kill

Note that with traditional CGI scripts, a page of output which stops printing may indicate that the process was killed by the server, or that the Perl script contained a runtime code error which caused the Perl interpreter to abort. The Fluid Dynamics Search Engine contains a global exception handler which traps all runtime exceptions and prints an error report when they occur. Because of this, pages of FDSE output which stop midway through without any error message are almost certainly due to a server kill.

Note also that servers decide which CGI processes to kill by sampling the set of all processes, instead of checking each process. This ensures that all runaway processes will eventually be stopped, while not requiring too much overhead for auditing. As a result, if you launch a resource-intensive CGI script several times, you may see it killed at different places in its execution, or it may succeed sometimes and fail other times. This is normal.

Also, note that FDSE contains a web crawler with is active on the network. While it is on the network, it may hang for extremely long periods of time. This will appear as a page which has stopped processing in the middle, but your browser should tell you that it is still listening for content from the server. This is usually communicated subtly through movement within the browser logo in the far upper right of your screen. The server kill happens when your browser is no longer listening for content.

As of FDSE version, those using the admin page with Internet Explorer with Javascript enabled will see the error message "Warning: uncontrolled exit by Perl CGI script" when the server kills the process.

How to handle occasional killed processes

Try these ideas to handle occasional failures:

How to handle frequent killed processes

On some servers, most or all of the tasks you attempt will fail because the server kills the process. Here are some ideas for handling this problem:

    "Dealing with server timeouts and killed processes"