# Ray actors are killed unexpected

**URL:** <https://discuss.ray.io/t/ray-actors-are-killed-unexpected/13206>\
**Category:** Ray Core\
**Created:** [December 20, 2023, 4:24am UTC](https://discuss.ray.io/t/ray-actors-are-killed-unexpected/13206 "2023-12-20T04:24:44Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![lebaf](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ray.io/lebaf/32/5510_2.png) [@lebaf](https://discuss.ray.io/u/lebaf)\
**Post date:** [December 20, 2023, 4:24am UTC](https://discuss.ray.io/t/ray-actors-are-killed-unexpected/13206/1 "2023-12-20T04:24:44Z")

</div>

**How severe does this issue affect your experience of using Ray?**

- Low: It annoys or frustrates me for a moment.

I am performing a ray pipeline task. After loading the data, it is allocated to two actors on the GPU for model inference using the `map_batches` method. Subsequently, the results of the model inference are allocated to an actor on the CPU for further post-processing, again using the `map_batches` method. The number of CPU actors used for post-processing is controlled by the `ActorPoolStrategy` , with `min_size=1` and `max_size=8` .

However, I have observed in the Ray timeline that the actors used for post-processing are frequently killed, and Ray initializes new actors for post-processing. Strangely, if I specify `min_size=max_size=8` while keeping everything else the same, no actors are killed at all. After examining the dashboard and logs, I don’t believe this is caused by an Out Of Memory (OOM) issue. This has been bothering me for several days, and I wonder why the actors will be killed.

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

---

<div class="post-metadata">

**Author:** ![lebaf](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ray.io/lebaf/32/5510_2.png) [@lebaf](https://discuss.ray.io/u/lebaf)\
**Post date:** [December 20, 2023, 4:26am UTC](https://discuss.ray.io/t/ray-actors-are-killed-unexpected/13206/2 "2023-12-20T04:26:59Z")

</div>

Here is part of the timeline.  
All the workers in the image correspond to actors on the CPU used for post-processing.

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

---

<div class="post-metadata">

**Author:** ![jjyao](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ray.io/jjyao/32/1799_2.png) [@jjyao](https://discuss.ray.io/u/jjyao)\
**Post date:** [December 24, 2023, 2:42am UTC](https://discuss.ray.io/t/ray-actors-are-killed-unexpected/13206/3 "2023-12-24T02:42:48Z")

</div>

Could you share your code, it will help us debug the issue.
