{"record":{"id":"4df2c39774bbbdf3","repo":"alibaba/DataX","slug":"d-0","errorCode":null,"errorMessage":"通道容量[%d]必须大于0.","messagePattern":"通道容量\\[(.+?)\\]必须大于0\\.","errorType":"validation","errorClass":"IllegalArgumentException","httpStatus":null,"severity":"critical","filePath":"core/src/main/java/com/alibaba/datax/core/transport/channel/Channel.java","lineNumber":60,"sourceCode":"    protected volatile long waitWriterTime = 0;\n\n    private static Boolean isFirstPrint = true;\n\n    private Communication currentCommunication;\n\n    private Communication lastCommunication = new Communication();\n\n    public Channel(final Configuration configuration) {\n        //channel的queue里默认record为1万条。原来为512条\n        int capacity = configuration.getInt(\n                CoreConstant.DATAX_CORE_TRANSPORT_CHANNEL_CAPACITY, 2048);\n        long byteSpeed = configuration.getLong(\n                CoreConstant.DATAX_CORE_TRANSPORT_CHANNEL_SPEED_BYTE, 1024 * 1024);\n        long recordSpeed = configuration.getLong(\n                CoreConstant.DATAX_CORE_TRANSPORT_CHANNEL_SPEED_RECORD, 10000);\n\n        if (capacity <= 0) {\n            throw new IllegalArgumentException(String.format(\n                    \"通道容量[%d]必须大于0.\", capacity));\n        }\n\n        synchronized (isFirstPrint) {\n            if (isFirstPrint) {\n                Channel.LOG.info(\"Channel set byte_speed_limit to \" + byteSpeed\n                        + (byteSpeed <= 0 ? \", No bps activated.\" : \".\"));\n                Channel.LOG.info(\"Channel set record_speed_limit to \" + recordSpeed\n                        + (recordSpeed <= 0 ? \", No tps activated.\" : \".\"));\n                isFirstPrint = false;\n            }\n        }\n\n        this.taskGroupId = configuration.getInt(\n                CoreConstant.DATAX_CORE_CONTAINER_TASKGROUP_ID);\n        this.capacity = capacity;\n        this.byteSpeed = byteSpeed;\n        this.recordSpeed = recordSpeed;","sourceCodeStart":42,"sourceCodeEnd":78,"githubUrl":"https://github.com/alibaba/DataX/blob/80ec23d5c5328eb90ca364d2749e92dfaf44541e/core/src/main/java/com/alibaba/datax/core/transport/channel/Channel.java#L42-L78","documentation":"Channel's constructor reads core.transport.channel.capacity (default 2048) and throws IllegalArgumentException if the value is <= 0. Capacity is the number of records the in-memory queue of the transfer channel may hold; zero/negative capacity would make producer/consumer blocking logic impossible, so it is rejected at construction.","triggerScenarios":"Setting -Ddatax.core.transport.channel.capacity=0 or the equivalent key in core.json/job JSON to 0 or a negative number. Each task group constructs a Channel, so the job dies at startup, before any data moves.","commonSituations":"Users copy tuned core.json templates and set capacity to 0 to 'disable buffering'; env-var/JSON typos (e.g. \"capacity\": -1); someone confuses capacity with speed limits (byte/record speed, where <=0 means unlimited).","solutions":["Set core.transport.channel.capacity to a positive value (default 2048; larger for wide records, smaller for memory pressure).","If the intent was unlimited speed, leave capacity positive and set speed.byte/record to -1 or 0 instead.","Validate job/core JSON before submitting: assert capacity > 0."],"exampleFix":"// before (core.json)\n\"channel\": { \"capacity\": 0 }\n\n// after\n\"channel\": { \"capacity\": 2048 }","handlingStrategy":"validation","validationCode":"int capacity = configuration.getInt(\"core.transport.channel.capacity\", 2048);\nif (capacity <= 0) throw new IllegalArgumentException(\"channel capacity must be > 0, got \" + capacity);","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Keep core.transport.channel.capacity positive (default 2048).","Use speed.byte/record (not capacity) to control throttling; <=0 there means unlimited."],"tags":["datax","channel","config","startup"],"backgroundTag":null,"analyzedSha":"80ec23d5c5328eb90ca364d2749e92dfaf44541e","analyzedAt":"2026-08-14T15:33:51.187Z","schemaVersion":2},"datasetVersion":"2026-08-15T17:31:12.345Z"}