Get hands-on experience with 20+ free Google Cloud products and $300 in free credit for new customers.

Cloud Run job automatically stop after some time

I have a cloud run job which is the timeout for 22 hours but most of the time it will stop after 10 hours I even checked the resource in metrics weather the job stopped because of CPU limited but cpu usage is less and 2% and memory less than 4%
Here is log:
{
"protoPayload": {
"@type": "type.googleapis.com/google.cloud.audit.AuditLog",
"status": {
"code": 2,
"message": "Execution civilinquiry-job-3-qjpfk has failed to complete, 0/1 tasks were a success."
},
"serviceName": "run.googleapis.com",
"methodName": "/Jobs.RunJob",
"resourceName": "namespaces/root-rock-457521-e7/executions/civilinquiry-job-3-qjpfk",
"response": {
"metadata": {
"name": "civilinquiry-job-3-qjpfk",
"namespace": "1019114991284",
"selfLink": "/apis/run.googleapis.com/v1/namespaces/1019114991284/executions/civilinquiry-job-3-qjpfk",
"uid": "68233d1d-08ba-427f-a376-2896446f023a",
"resourceVersion": "AAY1JTAmYmo",
"generation": 1,
"creationTimestamp": "2025-05-14T20:22:32.770192Z",
"labels": {
"run.googleapis.com/job": "civilinquiry-job-3",
"run.googleapis.com/jobResourceVersion": "1747253580681666",
"run.googleapis.com/jobGeneration": "7",
"run.googleapis.com/jobUid": "905c1f08-6253-4978-891f-da5e7d31b122",
"cloud.googleapis.com/location": "us-central1"
},
"annotations": {
"run.googleapis.com/client-name": "cloud-console",
"run.googleapis.com/execution-environment": "gen2",
"run.googleapis.com/creator": "anishshakthivelnadar@gmail.com",
"run.googleapis.com/lastModifier": "<PII Removed by Staff>",
"run.googleapis.com/operation-id": "d9533f45-57f8-42c9-9ca1-85865a11e109"
},
"ownerReferences": [
{
"kind": "Job",
"name": "civilinquiry-job-3",
"uid": "905c1f08-6253-4978-891f-da5e7d31b122",
"apiVersion": "serving.knative.dev/v1",
"controller": true,
"blockOwnerDeletion": true
}
]
},
"apiVersion": "run.googleapis.com/v1",
"kind": "Execution",
"spec": {
"parallelism": 1,
"taskCount": 1,
"template": {
"spec": {
"containers": [
{
"name": "civilinquiry-job-3-1",
"image": "us-central1-docker.pkg.dev/root-rock-457521-e7/cloud-run-job-source-deploy/civilinquiry-job-3@sha256:dd773a4f129a9f312c7b10256a78f13d6ae490327fb16b828f717ab97edd18ce",
"resources": {
"limits": {
"cpu": "2000m",
"memory": "4Gi"
}
}
}
],
"maxRetries": 0,
"timeoutSeconds": "82800",
"serviceAccountName": "civilinquiry-python@root-rock-457521-e7.iam.gserviceaccount.com"
}
}
},
"status": {
"observedGeneration": 1,
"conditions": [
{
"type": "Completed",
"status": "False",
"lastTransitionTime": "2025-05-15T04:34:56.469794Z"
},
{
"type": "ResourcesAvailable",
"status": "True",
"lastTransitionTime": "2025-05-14T20:22:33.534312Z"
},
{
"type": "Started",
"status": "True",
"lastTransitionTime": "2025-05-14T20:23:34.654695Z"
},
{
"type": "ContainerReady",
"status": "True",
"lastTransitionTime": "2025-05-14T20:22:33.434217Z"
},
{
"type": "Retry",
"status": "True",
"reason": "ImmediateRetry",
"message": "System will retry after 0:00:00 from lastTransitionTime for attempt 0.",
"lastTransitionTime": "2025-05-15T04:34:58.147946Z",
"severity": "Info"
}
],
"startTime": "2025-05-14T20:23:34.654695Z",
"completionTime": "2025-05-15T04:34:56.469794Z",
"logUri": "https://console.cloud.google.com/logs/viewer?project=root-rock-457521-e7&advancedFilter=resource.typ...",
"cancelledCount": 1
},
"@type": "type.googleapis.com/google.cloud.run.v1.Execution"
}
},
"insertId": "rrxcmoe1d5im",
"resource": {
"type": "cloud_run_job",
"labels": {
"location": "us-central1",
"job_name": "civilinquiry-job-3",
"project_id": "root-rock-457521-e7"
}
},
"timestamp": "2025-05-15T04:34:58.177500Z",
"severity": "ERROR",
"labels": {
"run.googleapis.com/execution_name": "civilinquiry-job-3-qjpfk"
},
"logName": "projects/root-rock-457521-e7/logs/cloudaudit.googleapis.com%2Fsystem_event",
"receiveTimestamp": "2025-05-15T04:34:58.644249579Z"
}

0 3 766
3 REPLIES 3

Jobs typically are expected to run until they exit. Is your job perhaps done after 10 hours and therefore exits and successfully completes?

Or are these failures?

No, these are failures
I set the max run time of 22 hours but while running my job close after 10 hours and failed the job

 

Is there anything actionable in the logs? It sounds to me like it could be an out-of-memory situation.

If this happens consistently after about 10 hours, that sounds like it's an issue with your workload, rather than a problem on Cloud Run's side.

Top Solution Authors