# PENDING\_CREATION problem

**URL:** <https://discuss.ray.io/t/pending-creation-problem/8194>\
**Category:** Ray Clusters\
**Created:** [November 9, 2022, 6:05am UTC](https://discuss.ray.io/t/pending-creation-problem/8194 "2022-11-09T06:05:35Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![bilc](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ray.io/bilc/32/3249_2.png) [@bilc](https://discuss.ray.io/u/bilc)\
**Post date:** [November 9, 2022, 6:05am UTC](https://discuss.ray.io/t/pending-creation-problem/8194/1 "2022-11-09T06:05:35Z")

</div>

The cluster is run on k8s. The nodes is in Pod. Code:

```auto

@ray.remote(num_cpus=4)
class Counter(object):
    def __init__ (self):
        self.value = 0

    def increment(self):
        time.sleep(1)
        self.value += 1
        return self.value

    def get_counter(self):
        return self.value

counters = [Counter.remote() for _ in range(20)]

# Increment each Counter once and get the results. These tasks all happen in
# parallel.
results = ray.get([c.increment.remote() for c in counters])
print(results) # prints [1, 1, 1, 1, 1, 1, 1, 1, 1, 1]

# Increment the first Counter five times. These tasks are executed serially
# and share state.
results = ray.get([counters[0].increment.remote() for _ in range(5)])
print(results) # prints [2, 3, 4, 5, 6]

```

Logs:

 ![image](https://us1.discourse-cdn.com/flex020/uploads/ray/original/2X/3/3a1077be7fcacb50cc0333f1b78704c1e2f92fb7.png)

---

<div class="post-metadata">

**Author:** ![Dmitri](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ray.io/dmitri/32/657_2.png) [@Dmitri](https://discuss.ray.io/u/Dmitri)\
**Post date:** [November 9, 2022, 5:32pm UTC](https://discuss.ray.io/t/pending-creation-problem/8194/2 "2022-11-09T17:32:55Z")

</div>

We’ll probably need more reproduction info to figure out what’s up and debug.  
How did you set up the Ray pod? Could you share configs and software versions?

@sangcho @rickyyx to take over on this thread

---

<div class="post-metadata">

**Author:** ![sangcho](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ray.io/sangcho/32/425_2.png) [@sangcho](https://discuss.ray.io/u/sangcho)\
**Post date:** [November 9, 2022, 11:02pm UTC](https://discuss.ray.io/t/pending-creation-problem/8194/3 "2022-11-09T23:02:10Z")

</div>

I think you just don’t have enough cpus to create 4 CPUs \* 20 counters? What’s the output of `ray status`?

---

<div class="post-metadata">

**Author:** ![bilc](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ray.io/bilc/32/3249_2.png) [@bilc](https://discuss.ray.io/u/bilc)\
**Post date:** [November 11, 2022, 6:22am UTC](https://discuss.ray.io/t/pending-creation-problem/8194/4 "2022-11-11T06:22:08Z")

</div>

I find the problem is k8s donot have enough resources for pod. Thx

---

<div class="post-metadata">

**Author:** ![bilc](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ray.io/bilc/32/3249_2.png) [@bilc](https://discuss.ray.io/u/bilc)\
**Post date:** [November 14, 2022, 8:07am UTC](https://discuss.ray.io/t/pending-creation-problem/8194/6 "2022-11-14T08:07:01Z")

</div>

At last， the reason is memory of head pod is too small. I modified the memory 4G to 32G, and the problem disappeared. But I cannot find useful info in the process.
