| Problem | The platform collection size limit was raised, but collections created before the change still enforce the old limit |
| Affects | Enterprise h2oGPTe 1.6.x and 1.7.x |
| Workaround | Raise the limit on individual collections from the UI — workable for a handful, not for a whole deployment |
| Solution | Update the affected collections in bulk with the h2oGPTe Python client, in three stages: dry run, pilot, apply |
Problem
The maximum collection size is increased on the platform — for example from 1 GB to 10 GB — usually as part of an upgrade or a configuration change.
Collections created after the change show the new limit. Collections created before it still show and enforce the previous limit, and users working in them keep hitting the old ceiling.
There is no error message to search for. The symptom is an upload that stops at the old limit in a collection whose settings still read the old value, on a platform where the limit has already been raised.
On a deployment with many pre-existing collections this affects every one of them, and the UI offers no way to correct them in bulk.
Affected versions
| Product | Enterprise h2oGPTe 1.6.x and 1.7.x |
|---|---|
| Feature area | Collections, size limits, administration |
| Permission needed | A role that can manage collections. An admin account is recommended for a bulk operation. |
| Tooling | h2ogpte Python client, at a version matching your platform |
| Fixed in | Not a defect — the per-collection limit is set at creation time by design. The bulk update below is the supported correction. |
Cause
A collection's size limit is a property of that collection, recorded when the collection is created. The platform-level default supplies the starting value for newly created collections only — it is not re-evaluated against collections that already exist.
Raising it therefore changes the default for future collections and leaves existing ones untouched. Each existing collection has to be updated individually.
Workaround
The size limit is editable per collection in the collection's settings. If only a few collections are affected, or only a few users are blocked, raising those individually is the fastest route and needs no tooling.
This does not scale. There is no multi-select or bulk edit, so on a deployment with hundreds or thousands of collections use the bulk update below instead.
Solution
List the collections below the desired limit and update them. Work through three stages and do not skip them — this writes to every affected collection on the deployment.
- Dry run. List the collections that would change. Review the count and the values before touching anything.
- Pilot. Update a single collection, then confirm in the UI that its limit reads as expected.
- Apply. Update the remainder.
Run the whole sequence against a test or staging deployment first if you have one.
h2oGPTe reports collection sizes in decimal GB, so 10 GB is 10 * 1000**3 bytes. Using 1024**3 sets the limit to roughly 10.7 GB instead, which will not match what you intended or what the interface reports. Confirm the value the UI shows after the pilot stage before applying to the rest.
Before you start — API key handling
- Create a dedicated global API key for this task rather than reusing an existing one.
- Pass it through an environment variable, not by editing it into the script. A key pasted into a file tends to survive in shell history, editor backups and version control.
- Never print or log the key, and do not paste it into chat, tickets or screenshots.
- Revoke the key as soon as the work is finished — delete it from the APIs page in the account menu.
Script
Set the mode at the top and run each stage in order. The script reads the address and key from the environment:
export H2OGPTE_ADDRESS="https://your-h2ogpte-host" export H2OGPTE_API_KEY="..." # dedicated key, revoke when done
import os
from h2ogpte import H2OGPTE
MODE = "dry-run" # "dry-run" -> "pilot" -> "apply"
GB = 1000 ** 3 # decimal GB, matches what h2oGPTe displays
THRESHOLD = 10 * GB # update collections below this
NEW_LIMIT = 10 * GB # set them to this
client = H2OGPTE(
address=os.environ["H2OGPTE_ADDRESS"],
api_key=os.environ["H2OGPTE_API_KEY"],
)
def fmt(n):
if n is None:
return "unlimited"
v = float(n)
for unit in ("B", "KB", "MB", "GB", "TB"):
if v < 1000:
return f"{v:g} {unit}"
v /= 1000
return f"{v:g} PB"
def all_collections():
page_size, offset, out = 1000, 0, []
while True:
page = client.list_all_collections_sort(
offset=offset,
limit=page_size,
sort_column="name",
ascending=True,
)
if not page:
break
out.extend(page)
if len(page) < page_size:
break
offset += page_size
return out
def candidates():
return [
c for c in all_collections()
if c.size_limit is not None and c.size_limit < THRESHOLD
]
targets = candidates()
print(f"{len(targets)} collection(s) below {fmt(THRESHOLD)}")
if MODE == "dry-run":
for c in targets:
print(f" {c.id} {fmt(c.size_limit)} -> {fmt(NEW_LIMIT)}")
print("\nDry run only. No changes made.")
elif MODE == "pilot":
if not targets:
raise SystemExit("Nothing to update.")
pilot = targets[0]
client.set_collection_size_limit(collection_id=pilot.id, limit=NEW_LIMIT)
print(f"Pilot updated: {pilot.id}")
print("Verify this collection in the UI before running apply.")
elif MODE == "apply":
failures = []
for i, coll in enumerate(targets, 1):
try:
client.set_collection_size_limit(collection_id=coll.id, limit=NEW_LIMIT)
print(f"[{i}/{len(targets)}] ok {coll.id}")
except Exception as e:
failures.append((coll.id, str(e)))
print(f"[{i}/{len(targets)}] FAIL {coll.id}: {e}")
print(f"\nUpdated {len(targets) - len(failures)}, failed {len(failures)}")
for cid, err in failures:
print(f" {cid}: {err}")
Two properties worth knowing:
- The apply stage re-queries. It builds the target list fresh, so the pilot collection drops out automatically and any collections created since the dry run are included.
- The operation is resumable. If it is interrupted, already-updated collections no longer match the filter, so re-running continues where it stopped rather than repeating work.
Collections with no limit set are reported as unlimited and deliberately skipped, since setting a limit on them would reduce their capacity rather than raise it. To clear a limit instead of raising it, swap in remove_collection_size_limit(collection_id=...), which reverts the collection to the platform default. Consider storage capacity before doing this at scale.
On deployments using a private or self-signed certificate, the client may fail to verify the TLS certificate. The correct fix is to make your CA trusted — point REQUESTS_CA_BUNDLE at your CA bundle, or install the CA into the system trust store on the machine running the script.
The client also accepts verify=False, which disables certificate validation entirely. That removes protection against interception on a connection carrying an admin API key, so treat it strictly as a temporary local workaround: use it only from a trusted network, only for the duration of this task, and revert to proper verification afterwards. Do not carry it into any script you keep.
Running this at scale
On deployments with thousands of collections the apply stage makes one API call per collection and will take time.
- Run it during a quiet period rather than at peak usage.
- Capture the output to a file so you have a record of what changed and what failed.
- Individual failures do not stop the run. Review the failure summary at the end and re-run to retry only those, since successful collections drop out of the filter.
- If failures are widespread rather than isolated, stop and investigate instead of re-running — that usually points at a permission or connectivity problem rather than per-collection issues.
How to verify
- After the pilot, open that collection's settings in the UI and confirm the size limit reads as the new value.
- After the apply stage, re-run the script in dry-run mode. It should report 0 collections below the threshold.
- Spot-check several collections in the UI across different owners, not just ones you created.
- Confirm a user can now upload beyond the old ceiling in a previously affected collection.
- Revoke the API key created for this task and confirm it no longer appears as active.
If this doesn't resolve it
If the dry run returns far fewer collections than you expect, the account running the script probably cannot see all of them. Confirm it holds collection-management permissions, and compare the count against the total shown on the collections page in the System Dashboard.
If limits still enforce the old value after updating, open a support ticket and include:
- Exact h2oGPTe version and h2oGPTe Python client version
- The count reported by the dry run, and the total number of collections on the deployment
- The role and permissions of the account whose API key was used — not the key itself
- The limit value in bytes that you set, so decimal-versus-binary can be ruled out
- For an affected collection: the limit reported by the API and the limit shown in the UI
- Any errors from the apply stage, with collection IDs
Related
- Collections usage overview — what a collection is and how its settings behave.
- Update a collection's settings — the per-collection route used by the workaround.
- h2oGPTe Python API reference —
set_collection_size_limit,remove_collection_size_limitandlist_all_collections_sort. - Account menu — creating, scoping and deleting API keys.
- Roles and permissions — confirming the account can manage all collections.