# RayOutOfMemoryError

**URL:** <https://discuss.ray.io/t/rayoutofmemoryerror/2268>\
**Category:** RLlib\
**Created:** [May 24, 2021, 10:10am UTC](https://discuss.ray.io/t/rayoutofmemoryerror/2268 "2021-05-24T10:10:16Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Clement\_Collgon](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ray.io/clement_collgon/32/353_2.png) [@Clement\_Collgon](https://discuss.ray.io/u/Clement_Collgon)\
**Post date:** [May 24, 2021, 10:10am UTC](https://discuss.ray.io/t/rayoutofmemoryerror/2268/1 "2021-05-24T10:10:16Z")

</div>

Hello, I’m using ray RLLIB. It works perfectly well on all computers of my office, however, one with a bit more power gives us problem. When we launch runs on it, the memory will rise until it reaches maximum ( no dump of memory it seems ) and kill all active process one after another.

Error :

ray.\_private.memory\_monitor.RayOutOfMemoryError: More than 95% of the memory on node zeta-z1 is used (59.52 / 62.49 GB). The top 10 memory consumers are:

PID MEM COMMAND  
553077 1.76GiB ray::ImplicitFunc.train\_buffered()  
553084 1.73GiB ray::ImplicitFunc.train\_buffered()  
553083 1.73GiB ray::ImplicitFunc.train\_buffered()  
553074 1.71GiB ray::ImplicitFunc.train\_buffered()  
553086 1.52GiB ray::ImplicitFunc.train\_buffered()  
553085 1.5GiB ray::ImplicitFunc.train\_buffered()  
553131 1.49GiB ray::ImplicitFunc.train\_buffered()  
553082 1.48GiB ray::ImplicitFunc.train\_buffered()  
553087 1.46GiB ray::ImplicitFunc.train\_buffered()  
553071 1.46GiB ray::ImplicitFunc.train\_buffered()

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

Thanks in advance !

---

<div class="post-metadata">

**Author:** ![sven1977](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ray.io/sven1977/32/53_2.png) [@sven1977](https://discuss.ray.io/u/sven1977)\
**Post date:** [May 24, 2021, 10:18am UTC](https://discuss.ray.io/t/rayoutofmemoryerror/2268/2 "2021-05-24T10:18:10Z")

</div>

Hey @Clement_Collgon , can you give us more information on what Ray version, algorithm, RLlib config you are running with? Hard to diagnose from this distance w/o more information. Thanks.

---

<div class="post-metadata">

**Author:** ![Clement\_Collgon](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ray.io/clement_collgon/32/353_2.png) [@Clement\_Collgon](https://discuss.ray.io/u/Clement_Collgon)\
**Post date:** [May 24, 2021, 10:24am UTC](https://discuss.ray.io/t/rayoutofmemoryerror/2268/3 "2021-05-24T10:24:31Z")

</div>

Dear Sven,

the ray version 1.3.0,  
the RLLIB config is :  
“rllib”: {  
“grid\_search”: {  
“\_fake\_gpus”: false,  
“actor\_hidden\_activation”: “relu”,  
“actor\_hiddens”: [  
512,  
512  
],  
“actor\_lr”: 0.0001,  
“batch\_mode”: “truncate\_episodes”,  
“buffer\_size”: 300000,  
“callbacks”: “\<class ‘ray.rllib.agents.callbacks.DefaultCallbacks’\>”,  
“clip\_actions”: true,  
“clip\_rewards”: null,  
“collect\_metrics\_timeout”: 180,  
“compress\_observations”: false,  
“create\_env\_on\_driver”: false,  
“critic\_hidden\_activation”: “relu”,  
“critic\_hiddens”: [  
512,  
512  
],  
“critic\_lr”: 0.001,  
“custom\_eval\_function”: null,  
“custom\_resources\_per\_worker”: {},  
“eager\_tracing”: false,  
“env”: null,  
“env\_config”: {},  
“evaluation\_config”: {  
“env\_config”: {},  
“explore”: false  
},  
“evaluation\_interval”: null,  
“evaluation\_num\_episodes”: 10,  
“evaluation\_num\_workers”: 0,  
“exploration\_config”: {  
“final\_scale”: 1.0,  
“initial\_scale”: 1.0,  
“stddev”: 0.12,  
“type”: “GaussianNoise”  
},  
“explore”: true,  
“extra\_python\_environs\_for\_driver”: {},  
“extra\_python\_environs\_for\_worker”: {},  
“fake\_sampler”: false,  
“final\_prioritized\_replay\_beta”: 0.4,  
“framework”: “tf”,  
“gamma”: 0.9,  
“grad\_clip”: null,  
“horizon”: null,  
“huber\_threshold”: 1.0,  
“ignore\_worker\_failures”: false,  
“in\_evaluation”: false,  
“input”: “sampler”,  
“input\_evaluation”: [  
“is”,  
“wis”  
],  
“l2\_reg”: 0,  
“learning\_starts”: 1500,  
“local\_tf\_session\_args”: {  
“inter\_op\_parallelism\_threads”: 8,  
“intra\_op\_parallelism\_threads”: 8  
},  
“log\_level”: “WARN”,  
“log\_sys\_usage”: true,  
“logger\_config”: null,  
“lr”: 0.0001,  
“metrics\_smoothing\_episodes”: 100,  
“min\_iter\_time\_s”: 1,  
“model”: {  
“\_time\_major”: false,  
“conv\_activation”: “relu”,  
“conv\_filters”: null,  
“custom\_action\_dist”: null,  
“custom\_model”: null,  
“custom\_model\_config”: {},  
“custom\_preprocessor”: null,  
“dim”: 84,  
“fcnet\_activation”: “tanh”,  
“fcnet\_hiddens”: [  
256,  
256  
],  
“framestack”: true,  
“free\_log\_std”: false,  
“grayscale”: false,  
“lstm\_cell\_size”: 256,  
“lstm\_use\_prev\_action”: false,  
“lstm\_use\_prev\_action\_reward”: -1,  
“lstm\_use\_prev\_reward”: false,  
“max\_seq\_len”: 20,  
“no\_final\_linear”: false,  
“use\_lstm”: false,  
“vf\_share\_layers”: true,  
“zero\_mean”: true  
},  
“monitor”: -1,  
“multiagent”: {  
“count\_steps\_by”: “env\_steps”,  
“observation\_fn”: null,  
“policies”: {},  
“policies\_to\_train”: null,  
“policy\_mapping\_fn”: null,  
“replay\_mode”: “independent”  
},  
“n\_step”: 1,  
“no\_done\_at\_end”: false,  
“normalize\_actions”: false,  
“num\_cpus\_for\_driver”: 1,  
“num\_cpus\_per\_worker”: 0,  
“num\_envs\_per\_worker”: 1,  
“num\_gpus”: 0,  
“num\_gpus\_per\_worker”: 0,  
“num\_workers”: 10,  
“observation\_filter”: “NoFilter”,  
“optimizer”: {},  
“output”: null,  
“output\_compress\_columns”: [  
“obs”,  
“new\_obs”  
],  
“output\_max\_file\_size”: 67108864,  
“placement\_strategy”: “PACK”,  
“policy\_delay”: 2,  
“postprocess\_inputs”: false,  
“preprocessor\_pref”: “deepmind”,  
“prioritized\_replay”: false,  
“prioritized\_replay\_alpha”: 0.6,  
“prioritized\_replay\_beta”: 0.4,  
“prioritized\_replay\_beta\_annealing\_timesteps”: 20000,  
“prioritized\_replay\_eps”: 1e-06,  
“record\_env”: false,  
“remote\_env\_batch\_wait\_ms”: 0,  
“remote\_worker\_envs”: false,  
“render\_env”: false,  
“rollout\_fragment\_length”: 1,  
“sample\_async”: false,  
“sample\_collector”: “\<class ‘ray.rllib.evaluation.collectors.simple\_list\_collector.SimpleListCollector’\>”,  
“seed”: null,  
“shuffle\_buffer\_size”: 0,  
“simple\_optimizer”: -1,  
“smooth\_target\_policy”: false,  
“soft\_horizon”: false,  
“synchronize\_filters”: true,  
“target\_network\_update\_freq”: 0,  
“target\_noise”: 0.12,  
“target\_noise\_clip”: 1.0,  
“tau”: 0.001,  
“tf\_session\_args”: {  
“allow\_soft\_placement”: true,  
“device\_count”: {  
“CPU”: 1  
},  
“gpu\_options”: {  
“allow\_growth”: true  
},  
“inter\_op\_parallelism\_threads”: 2,  
“intra\_op\_parallelism\_threads”: 2,  
“log\_device\_placement”: false  
},  
“timesteps\_per\_iteration”: 1000,  
“train\_batch\_size”: 512,  
“training\_intensity”: null,  
“twin\_q”: true,  
“use\_huber”: false,  
“use\_state\_preprocessor”: false,  
“worker\_side\_prioritization”: false  
},  
“num\_samples”: 1,  
“policies\_config”: {},  
“ressources\_GS”: {  
“cpu”: 2,  
“gpu”: 0  
},  
“trainer”: “DDPG”  
},  
with the DDPG algorithm.  
The processor model name : Intel(R) Core™ i9-10920X CPU @ 3.50GHz  
The memory available : 64GB.

Thanks a lot
