{"record":{"id":"99ddf95b62ea48c5","repo":"eclipse-vertx/vert.x","slug":"http3maxpoolsize-must-be-0","errorCode":null,"errorMessage":"http3MaxPoolSize must be > 0","messagePattern":"http3MaxPoolSize must be > 0","errorType":"validation","errorClass":"IllegalArgumentException","httpStatus":null,"severity":"error","filePath":"vertx-core/src/main/java/io/vertx/core/http/PoolOptions.java","lineNumber":180,"sourceCode":"\n  /**\n   * Get the maximum pool size for HTTP/3 connections\n   *\n   * @return  the maximum pool size\n   */\n  public int getHttp3MaxSize() {\n    return http3MaxSize;\n  }\n\n  /**\n   * Set the maximum pool size for HTTP/3 connections\n   *\n   * @param max  the maximum pool size\n   * @return a reference to this, so the API can be used fluently\n   */\n  public PoolOptions setHttp3MaxSize(int max) {\n    if (max < 1) {\n      throw new IllegalArgumentException(\"http3MaxPoolSize must be > 0\");\n    }\n    this.http3MaxSize = max;\n    return this;\n  }\n\n  /**\n   * @return the pooled connection max lifetime unit\n   */\n  public TimeUnit getMaxLifetimeUnit() {\n    return maxLifetimeUnit;\n  }\n\n  /**\n   * Establish a max lifetime unit for pooled connections.\n   *\n   * @param maxLifetimeUnit pooled connection max lifetime unit\n   * @return a reference to this, so the API can be used fluently\n   */","sourceCodeStart":162,"sourceCodeEnd":198,"githubUrl":"https://github.com/eclipse-vertx/vert.x/blob/fb308bd8c3f12c79f4ae89bef67fadf6c80d036e/vertx-core/src/main/java/io/vertx/core/http/PoolOptions.java#L162-L198","documentation":"PoolOptions.setHttp3MaxSize() enforces that the HTTP/3 connection pool max size is at least 1. A value of 0 or negative throws this IllegalArgumentException since a zero-capacity pool cannot function.","triggerScenarios":"Calling setHttp3MaxSize(0) or negative, or PoolOptions.fromJson with an \"http3MaxSize\" entry <= 0 when configuring an HTTP/3 client.","commonSituations":"Template configs for HTTP/3 with placeholder 0 values; disabling HTTP/3 by zeroing its pool size instead of removing the option.","solutions":["Set http3MaxSize to a positive integer (>= 1).","If HTTP/3 is not used, omit the option instead of setting it to 0.","Clamp/validate configuration values before fromJson."],"exampleFix":"// before\nnew PoolOptions().setHttp3MaxSize(0);\n// after\nnew PoolOptions().setHttp3MaxSize(1); // or omit if HTTP/3 unused","handlingStrategy":"validation","validationCode":"int size = json.getInteger(\"http3MaxSize\", 1);\nif (size < 1) throw new IllegalArgumentException(\"http3MaxSize must be >= 1\");\nnew PoolOptions().setHttp3MaxSize(size);","typeGuard":"boolean validPoolSize(Integer v) { return v != null && v >= 1; }","tryCatchPattern":"try { poolOptions.setHttp3MaxSize(size); } catch (IllegalArgumentException e) { log.error(\"http3MaxSize must be >= 1\", e); }","preventionTips":["Omit HTTP/3 options entirely when HTTP/3 is not used instead of zeroing them.","Validate template configs that contain placeholder 0 values."],"tags":["http","http3","pool","configuration","validation"],"backgroundTag":"invalid-config-value","analyzedSha":"fb308bd8c3f12c79f4ae89bef67fadf6c80d036e","analyzedAt":"2026-09-06T11:37:12.241Z","contentChangedAt":"2026-09-06T11:37:12.241Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}