By: harmanjeet singh user 14 May 2018 at 5:10 a.m. CDT

7 Responses
harmanjeet singh gravatar
I am using Oxd Sever for Authentication .Using Oxd server i implement my login flow and it is working fine. But for this oxd-server must be in running mode for all time (24*7) . for this i used following steps 1)cd /opt/oxd-server 2)nohup bin/oxd-start.sh By this server runs in continous running mode but some it will break due to some memory issue and i have restart it again . In logs it shows OOM (out of memory ). How i can resolve this problem ?? Is there any way to increase its memory.

By Thomas Gasmyr Mougang staff 14 May 2018 at 5:34 a.m. CDT

Thomas Gasmyr Mougang gravatar
Hi signh, The first thing to do is to check which type of OutOfMemory error is throw. You can check that in the log file(`/var/log/oxd-server.log`), there a three common type. 1. Heap Space 1. Perm Gen Space 1. GC Overhead Since oxd-server run on the JVM, you can then increase the memory based on the OutOfMemory type. I noticed that you use `nohup bin/oxd-start.sh`, why not `nohup bin/oxd-start.sh &`? Thanks, Gasmyr.

By harmanjeet singh user 14 May 2018 at 6 a.m. CDT

harmanjeet singh gravatar
Here are the logs **java.lang.OutOfMemoryError: unable to create new native thread at java.lang.Thread.start0(Native Method) at java.lang.Thread.start(Thread.java:717) at java.util.concurrent.ThreadPoolExecutor.addWorker(ThreadPoolExecutor.java:957) at java.util.concurrent.ThreadPoolExecutor.execute(ThreadPoolExecutor.java:1367) at java.util.concurrent.Executors$DelegatedExecutorService.execute(Executors.java:668) at org.xdi.oxd.server.service.SocketService.listenSocket(SocketService.java:94) at org.xdi.oxd.server.ServerLauncher.startOxd(ServerLauncher.java:94) at org.xdi.oxd.server.ServerLauncher.start(ServerLauncher.java:62) at org.xdi.oxd.server.ServerLauncher.main(ServerLauncher.java:51)** Even I use nohup bin/oxd-start.sh & but still facing issue. How can I solve this memory issue

By Thomas Gasmyr Mougang staff 14 May 2018 at 6:06 a.m. CDT

Thomas Gasmyr Mougang gravatar
Run the following command and show me the output of the last one: 1. `#systemctl enable oxd-server` 1. `#systemctl stop oxd-server` 1. `#systemctl start oxd-server` 1. `#systemctl status oxd-server` You should see an output like this: > root@GasThinkpad:~# systemctl status oxd-server ● oxd-server.service - LSB: oxd-server start script. Loaded: loaded (/etc/init.d/oxd-server; bad; vendor preset: enabled) Active: active (running) since Mon 2018-05-14 11:46:04 WAT; 19min ago Docs: man:systemd-sysv-generator(8) CGroup: /system.slice/oxd-server.service └─13205 /usr/bin/java -server -Xms256m -Xmx512m -XX:MaxMetaspaceSize=256m -XX:+DisableExplicitGC -Doxd.server.config=/etc/oxd/oxd The interesting part is ` /usr/bin/java -server -Xms256m -Xmx512m -XX:MaxMetaspaceSize=256m -XX:+DisableExplicitGC -Doxd.server.config=/etc/oxd/oxd`

By harmanjeet singh user 14 May 2018 at 6:26 a.m. CDT

harmanjeet singh gravatar
Actually i did not installed it as service. I just download oxd-server.zip it and unzip it and use nohup bin/oxd-start.sh & to start. In short i am running its as binary and above mentioned commands did not work in my case..

By Thomas Gasmyr Mougang staff 14 May 2018 at 7:28 a.m. CDT

Thomas Gasmyr Mougang gravatar
Edit the file `/etc/init.d/oxd-server` and update the jvm parameters past there. You can change the following parameters: 1. -Xms256m to -Xms512m 1. -Xmx512m to -Xmx1024m You can use you shell scripting skill to achieve that.

By Thomas Gasmyr Mougang staff 16 May 2018 at 1:48 a.m. CDT

Thomas Gasmyr Mougang gravatar
Still need assistance on this ticket?

By harmanjeet singh user 16 May 2018 at 2:18 a.m. CDT

harmanjeet singh gravatar
Thanks Thomas Gasmyr Mougang