NOTE:
This page describes the behavior starting with versions 26.3.8 and 26.4. For version 26.3.7 and earlier, the exceptions described in the section /v1/docs/en/jdbc-fetch-size#behavior-up-to-26371 below apply.
When the Lobster Data Platform queries a database via a connection in Via Bridge (Standard) mode, it retrieves the results in batches. The fetch size controls two values:
How many rows the bridge transfers to the platform in an HTTP Response,
How many rows the JDBC driver of the bridge preloads from the database per DB roundtrip.
The default value is 500 rows per HTTP response, unless a value is configured on either side.
For connections with many narrow rows (e.g., ID queries, reference tables), a higher fetch size reduces the number of HTTP round trips between the platform and the bridge and increases throughput. Wide rows and BLOB/CLOB values are transferred without adjusting the fetch size, since large results are automatically split into batches of approximately 4 MB. Large LOB parameters (e.g., BLOB fields in Phase 4 profiles and in the SQL Bulk Unit) are also written to the database.
How results are transferred from the bridge to the platform
Each stack is an HTTP response. Three properties determine the maximum size of a stack; the first limit reached terminates the stack.
NOTE:
In a standard installation, none of these settings need to be configured.
Property | Location | Standard | Limit |
|---|---|---|---|
| Bridge (primary) or platform | 500 rows | Rows per batch; on the bridge, plus the database driver's prefetch. |
| Bridge | 4 MB (4,194,304 bytes) | Estimated bytes per batch (guideline). |
| Platform | 64 MB (67,108,864 bytes) | Largest response that the platform accepts (fixed upper limit); in practice, this only applies when a single line is very long. |
Fetch size: Rows per batch and cursor prefetch
-Dde.lobster.remoteJdbc.fetchSize=<N>Set in the scope of the JVM arguments in the ./bin/bridge.json file of the bridge installation. This property controls both levels simultaneously:
HTTP batch size (bridge to platform): The bridge uses
Nas the frame size, thereby overriding the value requested by the platform.DB cursor size (bridge to database): Before reading, the bridge calls
ResultSet.setFetchSize(N)to adjust the internal prefetch of the JDBC driver accordingly. This is a hint; some drivers ignore it (see the "Database-specific behavior of ResultSet.setFetchSize()" section below).
If the property is missing, the bridge uses the batch size requested by the platform (default 500) and does not call setFetchSize().
Database-specific behavior of ResultSet.setFetchSize()
setFetchSize() is non-binding (a JDBC hint). The driver may follow or ignore the value. Examples:
Database | Behavior |
|---|---|
PostgreSQL | If |
MySQL/MariaDB | If the values are positive, all rows are initially buffered in the heap. True streaming requires |
SQL Server | Adaptive buffering (default): large result sets are streamed automatically; the fetch size has little effect in this case. With |
Oracle | Default prefetch: 10 rows. |
H2/HSQLDB | Usually ignored; all rows are fetched at once. |
Threshold values for the response
Bridge: Byte quota per stack (maxFrameBytes)
-Dde.lobster.remoteJdbc.maxFrameBytes=<bytes>This is set in the JVM arguments section of the ./bin/bridge.json file in the bridge installation. The default value is 4 MB (4,194,304 bytes). The bridge estimates the size of each line and terminates the batch as soon as the quota is exceeded; the remaining lines are automatically included in the next batch. The order is preserved, and no lines are lost.
A single row that exceeds the quota is still transferred in its entirety and forms its own batch.
A lower value means smaller responses and less memory per request, but more round trips.
IMPORTANT:
maxFrameBytes(Bridge) andmaxResponseBytes(Platform) are located in different JVMs and are not synchronized with each other.maxFrameBytesshould therefore be significantly lower thanmaxResponseBytes. If one of these values is changed, the other must be checked.
Platform: Maximum accepted response (maxResponseBytes)
-Dde.lobster.remoteJdbc.maxResponseBytes=<bytes>Set in the JVM arguments section of the ./bin/platform.json file for the platform. The default value is 64 MB (67,108,864 bytes). Protects the platform's memory. In practice, this value is only exceeded by a single line that is larger than the value itself (e.g., a BLOB > 64 MB). The query then fails with the following message (see Control Center > Logs > Messages per profile):
Response from the Bridge exceeds 67108864 bytes - increase -Dde.lobster.remoteJdbc.maxResponseBytes on the PlatformIf a response approaches the threshold value, a WARN message appears in the bridge log beforehand:
WARN de.lobster.remote.RemoteJdbcServlet - SYSTEM:DATAWIZARD:TUNNEL response size 58123456 bytes for alias 'mydb' approaches the Platform response limit of 67108864 bytes — increase -Dde.lobster.remoteJdbc.maxResponseBytes on the Platform if queries failPlease note
Restart required: All three properties are read once at startup; changes take effect only after the respective JVM (bridge or platform) is restarted.
Only raw byte values: Values such as
64MBare automatically ignored; the default value applies instead. The maximum is approximately 2 GB.Estimated size per value: binary = length + 16 bytes, text = 3 bytes per character + 16 (UTF-8 in the worst-case scenario, which is why text-heavy stacks end slightly earlier), other values = 16 bytes.
First batch: The first batch of a query is also limited to a maximum of 100 lines by the Avatica protocol, regardless of the fetch size.
Not true streaming: Every response and every LOB value is still held entirely in memory on both sides; the limits only restrict how much is in memory at any given time.
Direction: The limits apply to results (from the bridge to the platform). Requests (from the platform to the bridge, e.g., INSERTs with large BLOBs) are not limited by these properties.
Transport:
maxResponseBytesapplies to the HTTP transport used in production (https://); the WebSocket transport has its own message limit of 100 MB.maxFrameBytesapplies to both.
Additional parameters
NOTE:
Configuration in
./bin/bridge.jsonis the recommended approach. The property can be set independently per bridge instance, and the change takes effect as soon as the bridge is restarted. Restarting the platform is significantly more disruptive.
Platform JVM property (via bridge (standard))
-Dde.lobster.remoteJdbc.fetchSize=<N>Set in the scope of the JVM arguments in the ./bin/platform.json file of the platform. Controls only the HTTP batch size, i.e., how many rows the platform requests per response. The bridge uses this value if it has not set its own property. The DB cursor on the bridge side is not affected.
The JDBC URL additionally accepts a connection-related parameter fetch_size=N. However, the platform generates the URL automatically; it is not editable by users.
Bridge JVM property (via bridge (legacy))
-Dde.lobster.tunnel.fetchSize=<N>Set in the scope of the JVM arguments in the ./bin/bridge.json file of the bridge installation. Applies only to the older TunnelDriver, i.e., for connections in Via Bridge (Legacy) mode. Calls ResultSet.setFetchSize(N) before materializing the result set and only affects the DB cursor. The complete result set is still sent in a single HTTP response; this property does not limit the HTTP response size. The response size limits from the section above do not apply to legacy connections.
Recommendations
Scenario | Recommended action |
|---|---|
Standard installation, no known issues | No configuration needed. |
Via bridge (standard) – wide rows or BLOB/CLOB columns | Nothing to do; large results are automatically split into batches of about 4 MB. |
Via bridge (standard) – individual values greater than 64 MB | Increase |
Via bridge (standard) – narrow lines, many round trips | Increase |
Via bridge (standard) – Oracle with many DB roundtrips | Set |
Via bridge (standard) – PostgreSQL/MySQL with large result sets | Fetch size tuning does not protect the bridge heap (autocommit buffers all rows). Instead, filter queries or limit result sets. |
Via bridge (standard) – Memory pressure on the bridge with large sets of results | Reduce |
Via bridge (legacy) – Oracle with many database round trips | Set |
Via bridge (legacy) – PostgreSQL/MySQL | Fetch size tuning has no effect; all rows are buffered. |
Behavior up to 26.3.7
In version 26.3.7 and earlier, the behavior differs from the description above:
The RemoteJdbcDriver (Jetty) HTTP client has a fixed response buffer size of 2 MB. Exceeding this limit generates the following message (see Control Center > Logs > Messages per profile):
java.lang.IllegalArgumentException: Buffering capacity 2097152 exceededWith the default value of 500 rows, the 2-MB limit allows for an average of about 4 KB per row (including Protobuf overhead). For connections with wide rows or LOB columns, the value of N is 100–200.
If a single response exceeds 1.7 MB, the bridge writes a WARN message to the bridge log, at most once every 10 minutes. Since the warning threshold is below the limit, the WARN message in the bridge log precedes the client-side error.
WARN de.lobster.remote.RemoteJdbcServlet - SYSTEM:DATAWIZARD:TUNNEL response size 1823456 bytes for alias 'mydb' approaches the 2 MB Jetty client limit — reduce -Dde.lobster.remoteJdbc.fetchSize to avoid 'Buffering capacity 2097152 exceeded'The properties maxFrameBytes and maxResponseBytes do not exist in these versions; large results are not automatically split.