{"record":{"id":"e1dc0bff02b98347","repo":"questdb/questdb","slug":"tcp-ilp-buffer-size-is-too-small-should-be-at-lea","errorCode":null,"errorMessage":"TCP ILP buffer size is too small, should be at least ${MIN_TCP_ILP_BUF_SIZE}, [${PropertyKey.LINE_TCP_RECV_BUFFER_SIZE.propertyPath}=${lineTcpRecvBufferSize}]","messagePattern":"TCP ILP buffer size is too small, should be at least (.+?), \\[(.+?)=(.+?)\\]","errorType":"validation","errorClass":"ServerConfigurationException","httpStatus":null,"severity":"error","filePath":"core/src/main/java/io/questdb/PropServerConfiguration.java","lineNumber":2112,"sourceCode":"\n                this.lineTcpConnectionPoolInitialCapacity = getInt(properties, env, PropertyKey.LINE_TCP_CONNECTION_POOL_CAPACITY, 8);\n\n                // deprecated\n                this.lineTcpNetConnectionRcvBuf = getIntSize(properties, env, PropertyKey.LINE_TCP_NET_RECV_BUF_SIZE, -1);\n                this.lineTcpNetConnectionRcvBuf = getIntSize(properties, env, PropertyKey.LINE_TCP_NET_CONNECTION_RCVBUF, lineTcpNetConnectionRcvBuf);\n                // deprecated\n                this.lineTcpRecvBufferSize = getIntSize(properties, env, PropertyKey.LINE_TCP_MSG_BUFFER_SIZE, 131072);\n                this.lineTcpRecvBufferSize = getIntSize(properties, env, PropertyKey.LINE_TCP_RECV_BUFFER_SIZE, lineTcpRecvBufferSize);\n                this.lineTcpMaxMeasurementSize = getIntSize(properties, env, PropertyKey.LINE_TCP_MAX_MEASUREMENT_SIZE, 32768);\n                if (lineTcpMaxMeasurementSize > lineTcpRecvBufferSize) {\n                    lineTcpRecvBufferSize = lineTcpMaxMeasurementSize;\n                }\n                this.lineTcpMaxRecvBufferSize = getLongSize(properties, env, PropertyKey.LINE_TCP_MAX_RECV_BUFFER_SIZE, Numbers.SIZE_1GB);\n                if (lineTcpRecvBufferSize > lineTcpMaxRecvBufferSize) {\n                    lineTcpMaxRecvBufferSize = lineTcpRecvBufferSize;\n                }\n                if (lineTcpRecvBufferSize < MIN_TCP_ILP_BUF_SIZE) {\n                    throw new ServerConfigurationException(\n                            \"TCP ILP buffer size is too small, should be at least \" + MIN_TCP_ILP_BUF_SIZE + \", [\"\n                                    + PropertyKey.LINE_TCP_RECV_BUFFER_SIZE.getPropertyPath() + \"=\" + lineTcpRecvBufferSize + ']');\n                }\n\n                this.lineTcpWriterQueueCapacity = getQueueCapacity(properties, env, PropertyKey.LINE_TCP_WRITER_QUEUE_CAPACITY, 128);\n                this.lineTcpWriterWorkerCount = getInt(properties, env, PropertyKey.LINE_TCP_WRITER_WORKER_COUNT, 0); // Use shared write pool by default\n                this.lineTcpWriterWorkerAffinity = getAffinity(properties, env, PropertyKey.LINE_TCP_WRITER_WORKER_AFFINITY, lineTcpWriterWorkerCount);\n                this.lineTcpWriterWorkerPoolHaltOnError = getBoolean(properties, env, PropertyKey.LINE_TCP_WRITER_HALT_ON_ERROR, false);\n                this.lineTcpWriterWorkerYieldThreshold = getLong(properties, env, PropertyKey.LINE_TCP_WRITER_WORKER_YIELD_THRESHOLD, 10);\n                this.lineTcpWriterWorkerNapThreshold = getLong(properties, env, PropertyKey.LINE_TCP_WRITER_WORKER_NAP_THRESHOLD, 7_000);\n                this.lineTcpWriterWorkerSleepThreshold = getLong(properties, env, PropertyKey.LINE_TCP_WRITER_WORKER_SLEEP_THRESHOLD, 10_000);\n                this.symbolCacheWaitBeforeReload = getMicros(properties, env, PropertyKey.LINE_TCP_SYMBOL_CACHE_WAIT_BEFORE_RELOAD, 500_000);\n                this.lineTcpIOWorkerCount = getInt(properties, env, PropertyKey.LINE_TCP_IO_WORKER_COUNT, 0); // Use shared IO pool by default\n                this.lineTcpIOWorkerAffinity = getAffinity(properties, env, PropertyKey.LINE_TCP_IO_WORKER_AFFINITY, lineTcpIOWorkerCount);\n                this.lineTcpIOWorkerPoolHaltOnError = getBoolean(properties, env, PropertyKey.LINE_TCP_IO_HALT_ON_ERROR, false);\n                this.lineTcpIOWorkerYieldThreshold = getLong(properties, env, PropertyKey.LINE_TCP_IO_WORKER_YIELD_THRESHOLD, 10);\n                this.lineTcpIOWorkerNapThreshold = getLong(properties, env, PropertyKey.LINE_TCP_IO_WORKER_NAP_THRESHOLD, 7_000);\n                this.lineTcpIOWorkerSleepThreshold = getLong(properties, env, PropertyKey.LINE_TCP_IO_WORKER_SLEEP_THRESHOLD, 10_000);","sourceCodeStart":2094,"sourceCodeEnd":2130,"githubUrl":"https://github.com/questdb/questdb/blob/6610ab113b84528a73388b0722a38b97f9df78c2/core/src/main/java/io/questdb/PropServerConfiguration.java#L2094-L2130","documentation":"Validates the TCP ILP (InfluxDB Line Protocol over TCP) receive buffer: line.tcp.recv.buffer.size (falling back to deprecated line.tcp.msg.buffer.size, default 131072) must be at least MIN_TCP_ILP_BUF_SIZE, which is AuthUtils.CHALLENGE_LEN + 1 = 513 bytes. The floor exists because the initial ILP/TCP handshake writes an auth challenge that must fit in the first receive buffer regardless of user sizing.","triggerScenarios":"Setting line.tcp.recv.buffer.size (or the deprecated line.tcp.msg.buffer.size) below 513. Note the code first raises the buffer to line.tcp.max.measurement.size (default 32768) if the measurement size is larger, so in practice you must also set a tiny max-measurement-size (< 513) to actually land here with small values.","commonSituations":"Aggressive memory tuning on small containers shrinking both buffer knobs together; copying a config that was never actually booted; using the deprecated key with a small value on a version where the new key's default no longer masks it.","solutions":["Set line.tcp.recv.buffer.size to at least 513; realistically keep the 131072 default or size it to your largest measurement plus header","If you also lowered line.tcp.max.measurement.size, raise it above 513 or remove it","Remove the deprecated line.tcp.msg.buffer.size key so it cannot silently supply an undersized base value"],"exampleFix":"# before\nline.tcp.recv.buffer.size=256\nline.tcp.max.measurement.size=256\n\n# after\nline.tcp.recv.buffer.size=131072\n# line.tcp.max.measurement.size removed (default 32768)","handlingStrategy":"validation","validationCode":"int recv = parseSize(firstNonBlank(props.get(\"line.tcp.recv.buffer.size\"), firstNonBlank(props.get(\"line.tcp.msg.buffer.size\"), \"131072\")));\nint maxMeas = parseSize(firstNonBlank(props.get(\"line.tcp.max.measurement.size\"), \"32768\"));\nint effective = Math.max(recv, maxMeas);\nif (effective < 513) { // MIN_TCP_ILP_BUF_SIZE = AuthUtils.CHALLENGE_LEN + 1\n    throw new IllegalStateException(\"TCP ILP buffer resolves to \" + effective + \", below the 513-byte floor\");\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Keep line.tcp.recv.buffer.size at the 131072 default unless measurement sizes force higher","Delete the deprecated line.tcp.msg.buffer.size key from old configs","Remember the buffer also carries the 512-byte auth challenge, so it can never go small"],"tags":["config","ilp","tcp","buffer-sizing","influxdb-line-protocol","startup"],"backgroundTag":null,"analyzedSha":"6610ab113b84528a73388b0722a38b97f9df78c2","analyzedAt":"2026-08-14T15:30:21.451Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}