All the Mods 7 - ATM7

All the Mods 7 - ATM7

3M Downloads

ComputerCraft causes OutOfMemoryError

twothe opened this issue ยท 1 comments

commented

When booting ATM 7-0.2.39 on a Linux server, ComputerCraft crashes while attempting to create native threads:

[20:44:12] [ComputerCraft-Network-1/ERROR]: Exception in thread ComputerCraft-Network-1
java.lang.OutOfMemoryError: unable to create native thread: possibly out of memory or process/resource limits reached
        at java.lang.Thread.start0(Native Method) ~[?:?]
        at java.lang.Thread.start(Thread.java:802) ~[?:?]
        at java.util.concurrent.ThreadPoolExecutor.addWorker(ThreadPoolExecutor.java:945) ~[?:?]
        at java.util.concurrent.ThreadPoolExecutor.processWorkerExit(ThreadPoolExecutor.java:1013) ~[?:?]
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1150) ~[?:?]
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635) ~[?:?]
        at java.lang.Thread.run(Thread.java:833) [?:?]

The server however has more than enough RAM available. As far as I could research it this means that CC creates way too many threads until the OS stops it. The Linux setting regarding threads are however more than enough as well, so CC would have to create over 1000 threads to cause this issue.

commented

This is related to certain VServers having specific thread limits and is not related to ATM, but leaving this in for future reference:

You can check the thread limit of your server by typing
systemctl show --property=DefaultTasksMax

If that thread limit is exceeded then the only thing that you can do is to reduce the amount of tasks that are running. Check with ps axu what is running, then uninstall/kill whatever you do not need.