Busy Functions; Asynchronous Dns Lookup (Unix) - Sun Microsystems Netscape Enterprise Server Administrator's Manual

Table of Contents

Advertisement

Busy Functions

The default busy function returns a "503 Service Unavailable" response and logs
a message if LogVerbose is enabled. You may wish to modify this behavior
for your application. You can specify your own busy functions for any NSAPI
function in the obj.conf file by including a service function in the
configuration file in this format:
busy="<my-busy-function>"
For example, you could use this sample service function:
Service fn="send-cgi" busy="service-toobusy"
This allows different responses if the server become too busy in the course of
processing a request that includes a number of types (such as Service,
AddLog, and PathCheck). Note that your busy function will apply to all
functions that require a native thread to execute when the default thread type is
non-native.
To use your own busy function instead of the default busy function for the
entire server, you can write an NSAPI init function that includes a
func_insert call as shown below:
extern "C" NSAPI_PUBLIC int my_custom_busy_function(pblock *pb, Session *sn,
Request *rq);
my_init(pblock *pb, Session *, Request *)
func_insert("service-toobusy", my_custom_busy_function);
Busy functions are never executed on a pool thread, so you must be careful to
avoid using function calls that could cause the thread to block.

Asynchronous DNS Lookup (Unix)

You can configure the server to use Domain Name System (DNS) lookups
during normal operation. By default, DNS is not enabled; if you enable DNS,
the server looks up the host name for a system's IP address. Although DNS
lookups can be useful for server administrators when looking at logs, they can
Using perfdump Statistics to Tune Your Server
Chapter 10, Configuring the Server for Performance 245

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the Netscape Enterprise Server and is the answer not in the manual?

Questions and answers

Table of Contents