By: Marlon Martínez user 06 Oct 2020 at 5:42 p.m. CDT

2 Responses
Marlon Martínez gravatar
Since we upgraded our gluu version from 3.1.5 to 4.1 we are getting some server outages each day, the outages come each 20 - 24 hours so we looked into the log files and we found a "java.lang.outOfMemoryError: Java heap space" error inside the oxauth_script.log file. Also, we found other errors in other log files such "Failed to create LDAP connection pool! Result code: 91" or "Error ocurred while attempting to connect to server localhost:1636" but we thought all of these are related to the first one, when the server outage come because java is out of memory then the LDAP connection could not be established. After trying to login for a while, all this results in a "502 gluu error page". In the beggining we thought that the server outages came because our AWS instance resources were insufficient so we migrated our gluu system to another instance with more resources but this did not solve the problem. Also, we have followed all the related info about Performance Tuning, File descriptors, etc. from the official documentation. Is there anything we can do to avoid these server outages, maybe some server configurations? This is the [drive folder]( where you can find all the related logs and screenshots. This is our AWS instance configuration: RAM: 4GB HDD: 40GB SWAP: 6GB CPU: 2 Thank you for your support and help!

By Aliaksandr Samuseu staff 06 Oct 2020 at 5:49 p.m. CDT

Aliaksandr Samuseu gravatar
Hi, Marlon. Perhaps you need to assess current memory allocations for all the JVMs in the container? You can check the config files under `/etc/default/`. So for oxAuth it will be `/etc/default/oxauth`. There will be a line like that: ``` JAVA_OPTIONS="-server -Xms256m -Xmx1193m -XX:MaxMetaspaceSize=512m -XX:+DisableExplicitGC -Dgluu.base=/etc/gluu -Dserver.base=/opt/gluu/jetty/oxauth -Dlog.base=/opt/gluu/jetty/oxauth -Dpython.home=/opt/jython" ``` `-Xms` and `-Xmx` parameters set the lowest and highest size of the JVM's heap, correspondingly. You may consider bumping it up a bit. Repeat the same procedure for other services that face memory issues. Restart each service after it's done. Hope this helps.

By Marlon Martínez user 08 Oct 2020 at 12:41 p.m. CDT

Marlon Martínez gravatar
Thank you, I think it worked!