---
title: "Ice.*"
url: https://docs.zeroc.com/ice/3.8/property-reference/ice-properties
language: python
docs_index: https://docs.zeroc.com/llms.txt
---

> For an index of every page, see [llms.txt](https://docs.zeroc.com/llms.txt).

# Ice.\*

Programming language: Python. Other languages: [C++](https://docs.zeroc.com/ice/3.8/property-reference/ice-properties/cpp.md), [C#](https://docs.zeroc.com/ice/3.8/property-reference/ice-properties/csharp.md), [Java](https://docs.zeroc.com/ice/3.8/property-reference/ice-properties/java.md), [JavaScript](https://docs.zeroc.com/ice/3.8/property-reference/ice-properties/js.md), [MATLAB](https://docs.zeroc.com/ice/3.8/property-reference/ice-properties/matlab.md), [PHP](https://docs.zeroc.com/ice/3.8/property-reference/ice-properties/php.md), [Ruby](https://docs.zeroc.com/ice/3.8/property-reference/ice-properties/ruby.md), [Swift](https://docs.zeroc.com/ice/3.8/property-reference/ice-properties/swift.md).

> **Note**
>
> This mapping always accepts class cycles and sets `Ice.AcceptClassCycles` to `1` during communicator initialization.

## Ice.BackgroundLocatorCacheUpdates

`Ice.BackgroundLocatorCacheUpdates=num`

If `num` is set to `0` (the default), an invocation on an indirect proxy whose endpoints are older than the configured [locator cache](https://docs.zeroc.com/ice/3.8/runtime/locators/locator-semantics-for-clients/python.md) timeout triggers a locator cache update; the run time delays the invocation until the new endpoints are returned by the locator.

If `num` is set to a value larger than `0`, an invocation on an indirect proxy with expired endpoints still triggers a locator cache update, but the update is performed in the background, and the runtime uses the expired endpoints for the invocation. This avoids delaying the first invocation that follows expiry of a cache entry.

## Ice.BatchAutoFlushSize

`Ice.BatchAutoFlushSize=num` (in KiB)

This property controls how the Ice runtime deals with flushing of [batch messages](https://docs.zeroc.com/ice/3.8/runtime/invocation/invocation-mode/batched-invocations/python.md). If `num` is greater than `0`, the runtime automatically forces a flush of the current batch when a new message is added to a batch and that message would cause the batch to reach or exceed `num` KiB (1024 bytes per KiB). For stream transports, `0` disables automatic flushing: the application must flush batches explicitly. If not defined, the default value is `1024`.

For datagram proxies, Ice caps the flush threshold at [Ice.UDP.SndSize](https://docs.zeroc.com/ice/3.8/property-reference/ice-udp-properties/python.md) bytes, or 65507 bytes when that property is not set, including when `num` is `0`.

> **Warning**
>
> When flushed, batch requests are sent as a single Ice message. The Ice runtime in the receiver limits incoming messages to [Ice.MessageSizeMax](#ice.messagesizemax), so the sender must flush batch requests, manually or automatically, before they exceed this limit.

## Ice.ClassGraphDepthMax

`Ice.ClassGraphDepthMax=num`

Specifies the maximum depth for a graph of Slice class instances to unmarshal. If this maximum is reached, the Ice runtime throws a `MarshalException`. Reading and destroying a Slice class graph are recursive operations. This property prevents stack overflows from occurring if a sender sends a very large graph and not enough space on the stack is available. To read larger graphs, you can increase the value of this property. If not specified, the default value is `10`.

Setting this property to `0` (or to a negative number) disables the depth limit altogether.

## Ice.Compression.Level

`Ice.Compression.Level=num`

Specifies the bzip2 compression level to use when [compressing protocol messages](https://docs.zeroc.com/ice/3.8/runtime/compression/python.md). Values range from `1` to `9`, where `1` represents the fastest compression and `9` represents the best compression. Note that higher levels cause the bzip2 algorithm to devote more resources to the compression effort, and may not result in a significant improvement over lower levels. If not specified, the default value is `1`.

## Ice.Config

```config
Ice.Config=config_file[,config_file,...]
Ice.Config=1
```

This property must be set from the command line with one of the options `--Ice.Config`, `--Ice.Config=1`, or `--Ice.Config=config_file`.

If the `Ice.Config` property is empty or set to `1`, or not set at all, the Ice runtime examines the contents of the [ICE\_CONFIG](https://docs.zeroc.com/ice/3.8/runtime/properties-and-configuration/using-configuration-files/python.md) environment variable to retrieve the path names of one or more configuration files. Otherwise, `Ice.Config` must be set to the path names of one or more configuration files, separated by commas (path names can be relative or absolute). Property values are read from each of the configuration files listed.

Configuration files use a simple [syntax](https://docs.zeroc.com/ice/3.8/runtime/properties-and-configuration/configuration-file-syntax.md) consisting of *name*=*value* pairs with support for comments and escaping.

## Ice.HTTPProxyHost

`Ice.HTTPProxyHost=addr`

Specifies the host name or IP address of an HTTP proxy server. If `addr` is not empty, Ice uses the designated HTTP proxy server for all outgoing (client) connections.

## Ice.HTTPProxyPort

`Ice.HTTPProxyPort=num`

The port number of the HTTP proxy server. If not specified, the default value is `1080`.

## Ice.ImplicitContext

`Ice.ImplicitContext=type`

Specifies whether a communicator has an [implicit request context](https://docs.zeroc.com/ice/3.8/runtime/invocation/request-contexts/implicit-request-contexts/python.md) and, if so, at what scope the context applies. Legal values for this property are `None` (equivalent to the empty string), `PerThread`, and `Shared`. If not specified, the default value is `None`.

## Ice.InitPlugins

`Ice.InitPlugins=num`

If `num` is greater than `0`, Ice initializes the plug-ins it loads during communicator initialization. The default value is `1`. Setting this property to `0` leaves the plug-ins loaded but uninitialized.

## Ice.IPv4

`Ice.IPv4=num`

Specifies whether Ice uses IPv4. If `num` is a value greater than `0`, IPv4 is enabled. If not specified, the default value is `1`.

## Ice.IPv6

`Ice.IPv6=num`

Specifies whether Ice uses IPv6. If `num` is a value greater than `0`, IPv6 is enabled. If not specified, the default value is `1` if the system supports the creation of IPv6 sockets, and `0` otherwise.

## Ice.LogFile

`Ice.LogFile=file`

Selects a file-based [logger](https://docs.zeroc.com/ice/3.8/administration/logger-facility/default-logger/python.md) for the communicator. The logger appends messages to the specified file and creates the file if necessary. A logger supplied in `InitializationData` takes precedence over this property. The [per-process logger](https://docs.zeroc.com/ice/3.8/administration/logger-facility/per-process-logger/python.md) is unchanged.

Among the logging backends available on the platform, Ice checks `Ice.UseSyslog`, `Ice.UseOSLog`, `Ice.UseSystemdJournal` and `Ice.LogFile` in that order. `Ice.UseSyslog` and `Ice.LogFile` cannot be combined. An enabled OSLog or systemd logger takes precedence over the file logger.

## Ice.LogFile.SizeMax

`Ice.LogFile.SizeMax=num`

When `num` is greater than `0`, it sets the rotation threshold in bytes for log files configured through `Ice.LogFile`. Before writing a message that would bring a non-empty log file to or above this threshold, the Ice file-based logger renames the file to `basename-YYYYMMDD-HHMMSS.ext` and creates a new log file. The logger writes each message in full, even if the message exceeds the threshold.

When `num` is `0` or negative, the logger writes to a single file with unlimited size. The default value is `0`.

## Ice.LogStdErr.Convert

`Ice.LogStdErr.Convert=num`(Windows)

If `num` is set to a value larger than `0`, on Windows, the communicator's [default logger](https://docs.zeroc.com/ice/3.8/administration/logger-facility/default-logger/python.md) converts log messages from the application's narrow string encoding to the Windows console's code page. The default value for this property is `1` when `Ice.StdErr` is not set, and `0` otherwise. This property is read by the first communicator created in a process; it is ignored by other communicators.

## Ice.MessageSizeMax

`Ice.MessageSizeMax=num` (in KiB)

Sets the maximum size of an incoming Ice protocol message, in KiB (1024 bytes). The limit applies to the whole message, including the protocol header; for a compressed message, it also applies to the decompressed size. The default value is `1024` (1 MiB).

A value of `0` or less selects the largest supported size; a positive value must be at most 2,097,151 KiB (about 2 GiB).

Ice rejects an incoming message that exceeds this limit and logs a warning when [Ice.Warn.Connections](https://docs.zeroc.com/ice/3.8/property-reference/ice-warn-properties/python.md) is set. Over connection-oriented transports, Ice also closes the connection: a client receiving an oversized reply gets a `MarshalException` from its invocation, and a client whose request is oversized gets a `ConnectionLostException`.

See also [adapter.MessageSizeMax](https://docs.zeroc.com/ice/3.8/property-reference/object-adapter-properties/python.md).

## Ice.PluginLoadOrder

`Ice.PluginLoadOrder=names`

Specifies the order in which Ice creates the plug-ins installed through configuration, with `Ice.Plugin.name` properties. `names` lists plug-in names separated by commas or white space. Ice creates the plug-ins in `names` first, in that order, and then the other plug-ins installed through configuration, in an undefined order.

The built-in IceDiscovery and IceLocatorDiscovery plug-ins are created before dynamically loaded plug-ins when enabled through [Ice.Plugin.*name*](https://docs.zeroc.com/ice/3.8/property-reference/ice-plugin-properties/python.md). If `names` includes one of these enabled plug-ins, communicator initialization fails with a `PluginInitializationException`.

## Ice.PreferIPv6Address

`Ice.PreferIPv6Address=num`

If both IPv4 and IPv6 are enabled (the default), specifies whether Ice prefers IPv6 addresses over IPv4 addresses when resolving hostnames. If `num` is a value greater than `0`, IPv6 addresses are preferred. If not specified, the default value is `0`.

## Ice.PrintAdapterReady

`Ice.PrintAdapterReady=num`

If `num` is set to a value larger than `0`, an object adapter prints "*adapter\_name* ready" on standard output after activation is complete. This is useful for scripts that need to wait until an object adapter is ready to be used.

## Ice.PrintProcessId

`Ice.PrintProcessId=num`

If `num` is set to a value larger than `0`, the process ID is printed on standard output upon startup.

## Ice.PrintStackTraces

`Ice.PrintStackTraces=num`

If `num` is greater than `0`, Ice enables native stack-trace collection for local exceptions in the C++ runtime. These are native stack traces, rather than stack traces in the application's language.

The default value is `0` for an optimized C++ runtime and `1` for a debug runtime. On Windows, usable native stack traces require the Ice PDB files.

## Ice.ProgramName

`Ice.ProgramName=name`

Specifies the program name used for logging. If this property is empty, communicator initialization selects the following default:

| Language | Default |
| --- | --- |
| C++ | `argv[0]` when you create the communicator with `Ice::initialize(argc, argv)`; otherwise the executable's base name on Linux, macOS, and Windows, and an empty string on other platforms. |
| MATLAB | The executable's base name. |
| C# | `AppDomain.CurrentDomain.FriendlyName`. |
| Java and JavaScript | An empty string. |
| Python | The base name of `sys.argv[0]`, when available. |
| Ruby | The base name of `$0`. |
| PHP | The base name of `$_SERVER['SCRIPT_FILENAME']`, when available. |
| Swift | The last path component of `CommandLine.arguments.first`, when available. |

For mappings based on the C++ runtime, an empty language-specific default falls back to the executable's base name on Linux, macOS and Windows. Setting this property to a non-empty value overrides the default.

In C# and Java, Ice also uses this value as a prefix for runtime thread names.

## Ice.RetryIntervals

`Ice.RetryIntervals=num [num ...]`

This property defines the number of times an operation is [automatically retried](https://docs.zeroc.com/ice/3.8/runtime/invocation/automatic-retries/python.md) and the delay between each retry. For example, if the property is set to `0 100 500`, the operation is retried 3 times: immediately after the first failure, again after waiting 100ms after the second failure, and again after waiting 500ms after the third failure. The default value (`0`) means Ice retries once immediately. A first value of `-1` disables retries.

## Ice.ServerIdleTime

`Ice.ServerIdleTime=num`

If `num` is set to a value larger than `0`, Ice automatically calls `shutdown` on the communicator when its server thread pool has been idle for `num` seconds. The server thread pool is not idle as long as any of its thread is performing some task, like dispatching a request.

This call to `shutdown` shuts down the communicator's server side and causes any thread waiting on `waitForShutdown` to return. After that, a server will typically do some clean-up work before exiting. The default value is `0`, meaning that the server will not shut down automatically. This property is often used for servers that are automatically [activated by IceGrid](https://docs.zeroc.com/ice/3.8/services/icegrid/icegrid-server-activation.md).

> **Note**
>
> On Windows, the server idle time takes effect only once all the server thread pool idle threads have been reaped. The thread idle time can be configured with the [ThreadIdleTime](https://docs.zeroc.com/ice/3.8/property-reference/ice-threadpool-properties/python.md) thread pool property.

## Ice.SOCKSProxyHost

`Ice.SOCKSProxyHost=addr`

Specifies the host name or IP address of a SOCKS proxy server. If `addr` is not empty, Ice uses the designated SOCKS proxy server for all outgoing (client) connections.

> **Note**
>
> Ice supports the SOCKS4 protocol, which requires IPv4. If both `Ice.SOCKSProxyHost` and `Ice.HTTPProxyHost` are set, Ice uses the SOCKS proxy.

## Ice.SOCKSProxyPort

`Ice.SOCKSProxyPort=num`

The port number of the SOCKS proxy server. If not specified, the default value is `1080`.

## Ice.StdErr

`Ice.StdErr=filename`

If `filename` is not empty, the standard error stream of this process is redirected to this file, in append mode. This property is checked only for the first communicator that is created in a process.

## Ice.StdOut

`Ice.StdOut=filename`

If `filename` is not empty, the standard output stream of this process is redirected to this file, in append mode. This property is checked only for the first communicator created in a process.

## Ice.SyslogFacility

`Ice.SyslogFacility=string` (Linux and macOS only)

This property sets the syslog facility to `string`. This property has no effect if `Ice.UseSyslog` is not set. Each communicator can use its own facility, even when several communicators in the same process log to `syslog`.

`string` can be any of syslog facilities: `LOG_AUTH, LOG_AUTHPRIV, LOG_CRON, LOG_DAEMON, LOG_FTP, LOG_KERN, LOG_LOCAL0, LOG_LOCAL1, LOG_LOCAL2, LOG_LOCAL3, LOG_LOCAL4, LOG_LOCAL5, LOG_LOCAL6, LOG_LOCAL7, LOG_LPR, LOG_MAIL, LOG_NEWS, LOG_SYSLOG, LOG_USER, LOG_UUCP`.

The default value is `LOG_USER`.

## Ice.ToStringMode

`Ice.ToStringMode=string`

`string` must be one of the following: `Unicode`, `ASCII`, `Compat`.

This property maps to an enumerator of [ToStringMode](https://code.zeroc.com/ice/3.8/api/python/Ice.ToStringMode.html) and controls how `identityToString` and `proxyToString` on the communicator escape non-printable ASCII characters and non-ASCII characters.

The default value is `Unicode`.

## Ice.UseOSLog

`Ice.UseOSLog=num` (Apple platforms)

If `num` is set to a value larger than `0`, a special [logger](https://docs.zeroc.com/ice/3.8/administration/logger-facility/python.md) is installed that logs using [OSLog](https://developer.apple.com/documentation/os/oslog). The subsystem is `com.zeroc.ice` when `Ice.ProgramName` is empty, or `com.zeroc.ice.<ProgramName>` otherwise.

## Ice.UseSyslog

`Ice.UseSyslog=num` (Linux and macOS only)

If `num` is set to a value larger than `0`, a special [logger](https://docs.zeroc.com/ice/3.8/administration/logger-facility/python.md) is installed that logs to the `syslog` service instead of standard error. Use [Ice.SyslogFacility](#ice.syslogfacility) to select a `syslog` facility.

The connection to the `syslog` service is process-global: all syslog loggers in a process share a single connection, opened when the first syslog logger is created and closed when the last one is destroyed. As a result:

- The `syslog` identifier is the `Ice.ProgramName` of the communicator that creates the first syslog logger in the process. It remains in effect until all syslog loggers in this process are destroyed.
- A syslog logger with a different program name prepends this program name to each message it logs. For example, an IceBox server configured with `Ice.UseSyslog=1` and `IceBox.InheritProperties=1` logs its own messages under the identifier `icebox`, and the messages of each of its services with the prefix `icebox-<service name>:` followed by a space.
- `Ice.SyslogFacility` remains per-communicator: each message is logged with the facility configured for the communicator that produced it.

## Ice.UseSystemdJournal

`Ice.UseSystemdJournal=num` (Linux only)

If `num` is set to a value larger than `0`, a special [logger](https://docs.zeroc.com/ice/3.8/administration/logger-facility/python.md) is installed that logs to the systemd journal instead of standard error. Journal entries are tagged with the value of `Ice.ProgramName` as their syslog identifier (the `SYSLOG_IDENTIFIER` journal field), so you can filter them with `journalctl -t name`.

This property takes effect only when Ice was built with systemd support.
