What are the possible causes for when the Linux top command shows a Java process is using 14GBs of memory while Java profiling shows only 2GBs being used? Answer That means that your JVM / Java application is using off-heap memory. Lots of it. It could be memory-mapped files. It could be native libraries: unlikely … for that much memory.
Tag: java
How tomcat handle multiple concurrent request at the same time?
How tomcat handle multiple concurrent request at the same time ? Does it queues up the requests or processes some of the requests in parallel ? If it processes requests in parallel , how does it returns the asynchronous response ? Does it keeps the connection open with client until response comes ? If the tomcat uses a multi threaded
OSGi declarative service is active, but bind() is not called
I’m facing an issue in OSGi context with declarative services which I don’t understand. I try to explain: I have a FooService which needs the FooManagerService (1..1 static). The FooManagerService references the FooService, but it’s optional (0..n dynamic). The goal is, if a FooService becomes available, it registers (bind() method is called) at the FooManagerService, so that the FooManagerService always
How to run node server and java server in same command line in package.json start
I need to run : And : I tried : Or But in both case the java server is not running when I ask it in the node applicaition. But if I run both commande in 2 differents console. There is no problem. Thank you Edit: I try to do it in the npm start Answer Ok so I found
Need to run .jar from console for it to work
I have a java application. I’m using eclipse to write, compile and create a runnable .jar. The program is used to discover OCF devices. It uses UDP and multicast. Multicast code The code works when I start it from eclipse. It also works when I run the .jar from console on Linux. But when I start it with a double
Linux time conversion fail
My program will take the current system time in HH:MM:SS and convert it into seconds. The reason i convert it into second is because i want to find out the time that was 90 seconds ago. For example :Current time : 12:30:30Time 90 sec ago : 12:29:00 But i can’t make it to the correct timestamp. Here are the output
`spring.config.location` is ignored
Fairly straight forward. I have a configuration file: I run my application as a follows: And logging indicates the setting is visible to the application: 04:28:16.919 [main] WARNING CONFIG- [–spring.config.location=file:///etc/my-application] But my settings are ignored: The following yields the same outcome: So does: This doesn’t work either, the arguments don’t come through as well: Curiously enough if I specify the
dot dot(..) pathing doesnt work on java new file with linux running jenkins
I have this in a maven build on Jenkins. It’s being used to generate files. It works when building on my local machine(windows 7) but doesn’t work when i run it on Linux. It looks like it’s taking the .. as a literal folder path and not going back a directory. The error is: Answer Using basedir.getParent() works.
Linux top output unrealistic?
I’m having a weird issue with a java process which is consuming a lot of resources on a linux VM. The output of top for the process is the below : So this shows that the process is actually consuming 21G of physical memory ? When checking the process in more detail I can see it was started with -Xmx4G
java.lang.NullPointerException and return code
I’m running some java binary from bash like: run_me.sh but inside application I get java.lang.NullPointerException, howewer return code is 0, but I need some non zero exit code to understand from bash that application failed. What is the proper way to handle such cases? Update: Here is an exxample of ‘nested’ try catch blocks, when I throw exception in inner_package_class