0

I developed a website crawler using Java and it works great on my Windows XP laptop for days and days.

I tested it crawling 5 little websites on a dedicated server with 16Gb RAM, Linux - CentOS and it finishes to crawl in 2 hours, then continues to ping websites to check their uptime but after 2 - 3 hours it doesn't answer and I have to relaunch it. I tested it about 10 times and I see the same behaviour.

I force it to write application logs, but I see no exceptions. I print the memory usage and it only uses 50Mb and 100Mb are still available, so I don't think it's a memory problem.

Memory: Used: 46614 | Free: 91113 | Available: 137728 Total max: 2251776

I use this code to launch it:

java -jar myapp.jar -Xmx4000M

Any suggestions?

GingerGirl
  • 301
  • 1
  • 16
  • 1
    What do you mean by: "it doesn't asnwer", is the pid alive? Tried to get some insights using jconsole / jvisualvm to profile and see whats wrong? They are right inside the jdk installation and too simple to use. – Kedar Parikh Feb 23 '15 at 14:38
  • 1
    To avoid confusion, I would suggest changing the order of your command line options to "java -Xmx4000M -jar myapp.jar". Even if that works the way you have it, it's kinda confusing as trailing arguments could be arguments to the application rather than the JVM. See http://stackoverflow.com/questions/8123058/passing-on-command-line-arguments-to-runnable-jar – unigeek Feb 23 '15 at 14:45

0 Answers0