Skip to content

Configuration & env flags

VariableDefaultEffect
IFX_BUFFERED_READER1Enable connection-scoped read buffer (Phase 39). Set to 0 to disable.
IFX_DEBUG_WIREunsetWhen set to a truthy value, log wire-level PDU framing to stderr. Verbose; for debugging only.
IFX_PROTOCOL_TRACEunsetWhen set to a path, write annotated wire captures to the file.
IFX_DISABLE_PIPELINEunsetDisables pipelined executemany (Phase 33). Use only to A/B-measure.
INFORMIXSERVERRead by connect() if server= is not provided.

Environment variables are read at connection construction. Changing them at runtime doesn’t affect existing connections.

Full keyword list for informix_db.connect():

ArgTypeDefaultNotes
hoststrrequiredTCP host.
portint9088TCP port. 9089 is the typical TLS listener.
userstrrequired
passwordstrrequired
databasestr | NonerequiredNone logs in without selecting a DB.
serverstrrequiredDBSERVERNAME, not hostname.
autocommitboolFalse
connect_timeoutfloat | NoneNoneTCP+login timeout.
read_timeoutfloat | NoneNonePer-read timeout.
keepaliveboolFalseSO_KEEPALIVE.
client_localestr"en_US.8859-1"See SQL ↔ Python types for codec mapping.
envdict[str, str] | NoneNoneServer-side session env.
tlsbool | ssl.SSLContextFalseSee Connect with TLS.
ArgDefaultEffect
min_size1Connections to pre-warm at create time.
max_size10Hard cap.
acquire_timeout30.0Raise PoolTimeout after this many seconds.
max_idle600.0Close connections idle longer than this (seconds).
health_checkTrueValidate idle connections before returning from the pool.

All other connection arguments are forwarded to each pool-created connection.

The env={} parameter of connect() sets server session variables sent in the login PDU:

informix_db.connect(
...,
env={
"OPT_GOAL": "-1", # optimize for first-row return
"OPTOFC": "1", # auto-free cursors at fetch-close
"IFX_AUTOFREE": "1",
},
)

CLIENT_LOCALE is set automatically from client_locale= — don’t put it in env=.