Environment Variables

Server provides environment variables to manage specific features, such as debugging, tracing, and configuring. The table below presents these variables with their meaning. If you want to use these variables, just set them to the appropriate value indicated in the last column, and export them to subclasses.

Note

 If you use memory checkers, we recommend that you invalidate the optimized allocator to locate memory problems more easily. If you are benchmarking the Server classes for memory usage you should also invalidate the allocator. Otherwise, the memory usage figures will not be correct.

Environment Variables

Name of the Variable

Description

Default Value

ILS_DEBUG_ON_EXIT

On msvc6 only, this variable starts the Microsoft Visual C++ debugger when the application exits on a Fatal Error.

 

ILS_FORCE_CONSOLE

This variable is used on Windows® to force messages to the console if not explicitly set via a call to IlsInit.

any

ILSHOME

This configuration variable represents the directory where Server has been installed on your system.

path

ILS_INTEGRITY_CHECKED

When defined, this variable is equivalent to a call to the static member function IlsModel::SetIntegrityChecked.

any

ILS_INVALIDATE_ALLOCATOR

This variable invalidates the optimized allocator.

any

ILS_IOCTL_RETRIES

On Solaris, it may happen that the FIONREAD ioctl function returns 0 even if the socket is not closed. So, we can ask to retry ioctl call several times when it returns 0. Set the ILS_IOCTL_RETRIES environment variable to set the number of retries.

 

ILS_LIC_USER_NAME

This environment variable can be used to override the ILM user name that Server uses when asking for a license.

Refer to the Views ILM documentation for more information.

 

ILS_LOGFILE

Name of the log file to be used to store all messages. By default, the output also goes to the normal output stream and the file is truncated when the log file is created.

See the variables ILS_LOGFILE_ONLY and ILS_LOGFILE_APPEND below to see how this default behavior can be changed.

true

ILS_LOGFILE_APPEND

If this environment variable is set (and provided the environment variable ILS_LOGFILE is set), the messages that are sent to the log file are appended to the existing log file, if any.

false

ILS_LOGFILE_ONLY

If this environment variable is set (and provided the environment variable ILS_LOGFILE is set), output will go exclusively to the log file.

false

ILS_MVTCP_LISTEN_BACKLOG

Set the backlog of the listen socket .

3

ILSPATH

This configuration variable can be used to add a path that Server will use when reading files. Note that the Server/(Undefined variable: Primary.InForm) mapping does not use this variable but uses ILVPATH instead, because it is a client based on Views.

 

ILS_TCP_TRACE

This debugging variable traces low-level information from the MvTCP communication layer.

 

ILS_TCPD_LISTEN_PORT

This variable is used by the tcpd daemon to select its listen port and by the Server registering process to find the tcpd daemon to register with.

8000

ILS_TCPD_LOGFILE

Used by the tcpd daemon, this variable sets the logfile name.

<TMPDIR>/ilstcpd.log

LS_THREAD_STACK_SIZE

Allows you to set a value in bytes of the stack size of newly created threads when an IlsThread object is instantiated.

 

ILS_TRACE

This debugging variable traces the dynamic view engine on the server side and the representation model on the client side. Similar to the -ilstrace option on the command line. See the classes IlsMvServer and IlsMvComponent.

 

ILS_TRACE_NOTIFICATION

This debugging variable traces the notification engine operation.

any

ILS_TRACE_THREADS

When this variable is set, more information on the threading model of a server application is displayed.

 

ILS_TRACE_TIME

This variable enables time-tracing mode (see IlsMvServer).

 

ILS_UPDATE_CHECKED

This variable is equivalent to a call to the member function IlsModel::SetUpdateChecked when defined.

any

ILS_USE_MLK

Introduces a new memory allocator dedicated to storing a temporary data structure built when a dynamic view is opened. Sets the variable ILS_USE_MLK to revert to the previous behavior (allocating these data structure in the main Server memory allocator).

 

ILS_TCP_USE_RECV_TIMEOUT

When a network failure occurs during reception of a buffer, the ::recv socket operation may block without returning an error. A ::select() call has been added to the MvTCP library, before any call to ::recv, to work around this behavior. To enable this work-around, you have to set up the ILS_TCP_USE_RECV_TIMEOUT environment variable. The timeout can be set using the ILS_TCP_RECV_TIMEOUT environment variable (ms). The default value is 30s. If the ::select() times out, a communication error is triggered.

The default behavior when such an error is detected is to close the corresponding connection. This behavior is controlled by the method IlsMvProcess::DisconnectOnComError() which is, by default, set to true.

This behaviour can also be triggered by the function:

void SetIlsTcpUseRecvTimeout(IlsBoolean useRecvTimeout, IlsTime recvTimeout).

 

ILS_TCP_RECV_TIMEOUT

Set the recv timeout when ILS_TCP_USE_RECV_TIMEOUT is set.

30s

ILS_TCP_IGN_SIGPIPE

Used to ignore the SIGPIPE signal instead of trapping it. As this signal may be triggered by the system during network operation on UNIX® platform, Server traps it. In not well defined situation, this signal may still be fired without going through the signal handler defined by Server and stop the process. This environment variable allows ignoring the signal instead of trapping it.

 

ILS_TCP_DONT_RETRY_ON_SIG

The MvTCP read routine is retrying receiving data when the ::recv system call has been interrupted by a signal. Set this environment variable to raise an exception instead.

 

ILS_TCP_OLDRUNBEHAVIOR

The behavior of the main loop has changed: exceptions are no longer raised if an error occurs during execution of the select command on the MvTcp communication layer; instead, only a trace is generated. This behavior can be changed:

* You can restore the old behavior by setting the environment variable ILS_TCP_OLDRUNBEHAVIOR.

* You can change the default behavior yourself by setting the static variable IlsTcpMvProcess_RunHook. The specification of this variable is:

void (* IlsTcpMvProcess_RunHook)(IlsSocketException & e).

 

ILS_TCP_PACKET_SIZE
ILS_TCP_SEND_PACKET_SIZE
ILS_TCP_RECV_PACKET_SIZE

ILS_TCP_SEND_PACKET_SIZE is defining the size of the packets when sending on a socket and ILS_TCP_RECV_PACKET_SIZE, the size of the packets when receiving from a socket. If ILS_TCP_PACKET_SIZE is defined, it is used instead of these two values for both sending and receiving.

The following functions are also defined that allow to set these values by code:

 

* void SetIlsTcpSendPacketSize(unsigned int size)

* void SetIlsTcpRecvPacketSize(unsigned int size)

 

Note: The Microsoft recommended value for packets size sent into a socket is 4 Mo.

 

ILS_TCPD_EXIT_ON_ERROR

Socket errors occuring in tcpd don't stop the service. Set ILS_TCPD_EXIT_ON_ERROR if you want tcpd to stop when encountering errors.

 

ILS_TCP_OLDRUNBEHAVIOR

In the main loop, no exceptions is raised if an error occurs during execution of the select command on the MvTcp communication layer; but only a trace is generated. This behavior can be changed:

You can restore the old behavior (which raises an exception) by setting the environment variable ILS_TCP_OLDRUNBEHAVIOR.

You can change the default behavior yourself by setting the static variable IlsTcpMvProcess::RunHook. The specification of this variable is:
void (* IlsTcpMvProcess_RunHook)(IlsSocketException & e)

 

ILS_VIEWED_CACHE_INCREMENT

Delays the resizing of an internal cache. This cache was resized (size*2) when a view was opened for the second time, it is now resized later. This variable fixes the extra space available before resizing occurs.

1000

ILM_WAIT

This configuration turns on the loop that waits for a license to be available.

any