java.lang.OutOfMemoryError: Java heap space

Need help with SmartFoxServer? You didn't find an answer in our documentation? Please, post your questions here!

Moderators: Lapo, Bax

Post Reply
audi45
Posts: 4
Joined: 19 May 2020, 16:18

java.lang.OutOfMemoryError: Java heap space

Post by audi45 »

Hello, I am using Smartfoxserver pro
Today suddenly it stopped working
When I checked the logs
I found a lot of this :

Code: Select all

16:28:14.022 - [ WARNING ] > Generic Exception: java.lang.OutOfMemoryError: Java heap space
INFO   | jvm 1    | 2020/05/19 16:28:14 | java.lang.OutOfMemoryError: Java heap space
And sometimes this :

Code: Select all

[ WARNING ] > CheckNewConnection Problem: closed channel.
I restarted the server again and again
But as soon as I turn it on, the problem appears again

I am using Ubuntu 18.04.4 With the following information :

Code: Select all

 System load:  0.07              
  Usage of /:   15.5% of 24.06GB  
  Memory usage: 34%               
  Swap usage:   0%

Code: Select all

INFO   | jvm 1    | 2020/05/19 14:46:00 | --- [ System Info ] ------------------------------------------
INFO   | jvm 1    | 2020/05/19 14:46:00 |
INFO   | jvm 1    | 2020/05/19 14:46:00 | System CPU(s): 1
INFO   | jvm 1    | 2020/05/19 14:46:00 | VM Max memory: 85 MB
INFO   | jvm 1    | 2020/05/19 14:46:00 |
INFO   | jvm 1    | 2020/05/19 14:46:00 | os.name: Linux
INFO   | jvm 1    | 2020/05/19 14:46:00 | os.arch: amd64
INFO   | jvm 1    | 2020/05/19 14:46:00 | os.version: 4.15.0-99-generic
INFO   | jvm 1    | 2020/05/19 14:46:00 | java.version: 1.6.0_11
INFO   | jvm 1    | 2020/05/19 14:46:00 | java.vendor: Sun Microsystems Inc.
INFO   | jvm 1    | 2020/05/19 14:46:00 | java.vendor.url: http://java.sun.com/
INFO   | jvm 1    | 2020/05/19 14:46:00 | java.vm.specification.version: 1.0
INFO   | jvm 1    | 2020/05/19 14:46:00 | java.vm.version: 11.0-b16
INFO   | jvm 1    | 2020/05/19 14:46:00 | java.vm.vendor: Sun Microsystems Inc.
INFO   | jvm 1    | 2020/05/19 14:46:00 | java.vm.name: Java HotSpot(TM) 64-Bit Server VM
User avatar
Lapo
Site Admin
Posts: 23438
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: java.lang.OutOfMemoryError: Java heap space

Post by Lapo »

Hi,
according to your logs it looks like your server is running short on memory. The SmartFox JVM is starting up with 85MB of heap space, which is relatively small. SFS should be able to run anyway but it may not be able to handle many Rooms and users because you typically need 512MB (or more) to run in production and be able to deal with hundreds of users/rooms + custom Extensions etc...

I don't know how much system memory your server has, but maybe you need to either find out which other service is using a lot of memory or simply upgrade to a better server.

Hope it helps
Lapo
--
gotoAndPlay()
...addicted to flash games
Post Reply