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?