-1

I need an hint or maybe an tool,to try to get the optimization of 80.000 records. Most importantly of this issue is to try to understand an manner of simulating ,because the problem is getting in production and i dont have ,or better saying till now ,not have an specific tool for an application built in OSGI framework,Java.

More precisely if there is another way ,besides :

export JAVA_MIN_MEM=256M # Minimum memory for the JVM export JAVA_MAX_MEM=1024M # Maximum memory for the JVM export JAVA_PERM_MEM=128M # Minimum perm memory for the JVM export JAVA_MAX_PERM_MEM=256M # Maximum memory for the JVM

Below is a form of example of two calls:

curl -X POST 
http://localhost:8182/cxf/rest/ped/v1/terminals/shops 
 -H 'Content-Type: application/json' 
 -H 'Postman-Token: 743b0fdb-9df9-4751-ad8c-b0f7a4f96e87' 
 -H 'cache-control: no-cache' 
 -d '{
 "correlationId": "1cb67b93-783e-48e3-9820-bd936ca14df0",
 "terminalId": "0",
 "includeServiceDetail": "0"
'

and

curl -X POST 
http://localhost:8182/cxf/rest/ped/v1/terminals/shops 
 -H 'Content-Type: application/json' 
 -H 'Postman-Token: e29a3956-16e7-496d-af81-f5b424c41d4c' 
 -H 'cache-control: no-cache' 
 -d '{
 "correlationId": "5c62e30a-baff-469a-993f-429559979e7a",
 "includeServiceDetail": "0"
'

(its localhost ,because its in SSH).

In both cases it appears an error 500.

Below is the log,get in production:

Error:

Caused by:

org.apache.cxf.interceptor.Fault: GC overhead limit exceeded
at org.apache.cxf.service.invoker.AbstractInvoker.createFault(AbstractInvoker.java:162)
at org.apache.cxf.service.invoker.AbstractInvoker.invoke(AbstractInvoker.java:128)
at org.apache.cxf.jaxrs.JAXRSInvoker.invoke(JAXRSInvoker.java:193)
at org.apache.cxf.jaxrs.JAXRSInvoker.invoke(JAXRSInvoker.java:103) ...
at org.eclipse.jetty.util.thread.QueuedThreadPool$2.run(QueuedThreadPool.java:589)
at java.lang.Thread.run(Thread.java:748) Caused by: java.lang.OutOfMemoryError: GC overhead limit exceeded`

Everything helps ,even an comment,of an article not read till now.

E.jman21
  • 1
  • 1
  • 3

1 Answers1

0

The first google hit for that phrase seems to be pretty informative - https://plumbr.io/outofmemoryerror/gc-overhead-limit-exceeded.

Essentially, your Java server process has a certain amount of memory which it can work with - every time you create an object, by calling new ..., some of that memory gets used. When Java starts running low on memory, there is a background task, called the garbage collector, which identifies which of those objects are no longer needed, and frees up that memory so it can be reused. The particular error message you are getting means that the garbage collector is unable to reclaim enough memory for your program to continue.

If you know enough about how your Java server process is running, you can start by trying to increase the size of the memory (the heap) that it is given to work with. If you were running it via the command line, you'd pass the -Xmx argument to the java program, giving it a size larger than the default (so try something like -Xmx1G to begin). If you are running via some application container (e.g. Tomcat), you'll need to find the configuration file which contains the commands which get passed to java and set it there.