So currently We are experiencing a issue with the gemini batch where we want to process a 10 jsonl with ~150MB each the upload is always successful but when it comes to the gemini batch create we get resource exhausted 429 at around 4th Create we are also adding sleep in between the batch create of 120 seconds.
Mode: Gemini2.5-flash-lite
{“timestamp”: “2025-12-19T06:10:35.683864Z”, “level”: “INFO”, “service”: “main”, “message”: “Created batch job batches/bq8tz9fxi3r3x4yci84xla7xrp7frh44m687 (chunk 2)”, “logger”: “main”, “module”: “make_triggers”, “func”: “_call_llm_batch”, “line”: 630, “thread”: “MainThread”, “process”: 5072, “environment”: “local”, “run_id”: null, “extra”: {“taskName”: null}}
{“timestamp”: “2025-12-19T06:10:35.684146Z”, “level”: “INFO”, “service”: “main”, “message”: “About to sleep 120s before creating batch (chunk 2)”, “logger”: “main”, “module”: “make_triggers”, “func”: “_call_llm_batch”, “line”: 643, “thread”: “MainThread”, “process”: 5072, “environment”: “local”, “run_id”: null, “extra”: {“taskName”: null}}
{“timestamp”: “2025-12-19T06:12:49.090528Z”, “level”: “INFO”, “service”: “httpx”, “message”: “HTTP Request: POST https://generativelanguage.googleapis.com/v1beta/models/gemini-2.5-flash-lite:batchGenerateContent “HTTP/1.1 200 OK””, “logger”: “httpx”, “module”: “_client”, “func”: “_send_single_request”, “line”: 1025, “thread”: “MainThread”, “process”: 5072, “environment”: “local”, “run_id”: null, “extra”: {“taskName”: null}}
{“timestamp”: “2025-12-19T06:12:49.093195Z”, “level”: “INFO”, “service”: “main”, “message”: “Created batch job batches/yqgt7s2trw2yge8hszpigpvukrl73kt4ehrq (chunk 3)”, “logger”: “main”, “module”: “make_triggers”, “func”: “_call_llm_batch”, “line”: 630, “thread”: “MainThread”, “process”: 5072, “environment”: “local”, “run_id”: null, “extra”: {“taskName”: null}}
{“timestamp”: “2025-12-19T06:12:49.093351Z”, “level”: “INFO”, “service”: “main”, “message”: “About to sleep 120s before creating batch (chunk 3)”, “logger”: “main”, “module”: “make_triggers”, “func”: “_call_llm_batch”, “line”: 643, “thread”: “MainThread”, “process”: 5072, “environment”: “local”, “run_id”: null, “extra”: {“taskName”: null}}
{“timestamp”: “2025-12-19T06:14:58.114321Z”, “level”: “INFO”, “service”: “httpx”, “message”: “HTTP Request: POST https://generativelanguage.googleapis.com/v1beta/models/gemini-2.5-flash-lite:batchGenerateContent “HTTP/1.1 429 Too Many Requests””, “logger”: “httpx”, “module”: “_client”, “func”: “_send_single_request”, “line”: 1025, “thread”: “MainThread”, “process”: 5072, “environment”: “local”, “run_id”: null, “extra”: {“taskName”: null}}
{“timestamp”: “2025-12-19T06:14:58.116549Z”, “level”: “ERROR”, “service”: “main”, “message”: “Rate limited (RESOURCE_EXHAUSTED) at chunk 4. Stopping.”, “logger”: “main”, “module”: “logging_utils”, “func”: “error”, “line”: 34, “thread”: “MainThread”, “process”: 5072, “environment”: “local”, “run_id”: null, “extra”: {“taskName”: null}}
{“timestamp”: “2025-12-19T06:14:58.116614Z”, “level”: “INFO”, “service”: “main”, “message”: “Batch creation loop exited. Created 3 batches. Entering polling.”, “logger”: “main”, “module”: “make_triggers”, “func”: “_call_llm_batch”, “line”: 652, “thread”: “MainThread”, “process”: 5072, “environment”: “local”, “run_id”: null, “extra”: {“taskName”: null}}