Note that there are some explanatory texts on larger screens.

plurals
  1. POTomcat web application stops automatically
    text
    copied!<p>I have a dedicated server running CentOS 5.9, Apache-Tomcat 5.5.36. I have written a JAVA web applications which runs every minute to collect the data from multiple sensors. I am using ScheduledExecutorService to execute the threads. (one thread for each sensor every minute and there can be more than hundred sensors) The flow of the thread is</p> <ol> <li>Collect sensor information from the database.</li> <li>Sends the command to the instrument to collect data.</li> <li>Update the database with the data values.</li> </ol> <p>There is another application that checks the database every minute and send the alerts to the users (if necessary). I have monitored the application using jvisualVM, I cant find any memory leak. for every thread. The applications work fine but after some time(24 Hour - 48 Hours) the applications stop working. I cant find out what the problem could be, is it server configuration problem, too many threads or what?</p> <p>Does anyone have any idea what might be going wrong or is there anyone who has done think kind of work? Please help, Thanks</p> <p>UPDATE : including code</p> <pre><code>public class Scheduler { private final ScheduledExecutorService scheduler = Executors.newScheduledThreadPool(1); public void startProcess(int start) { final Runnable uploader = new Runnable() { @SuppressWarnings("rawtypes") public void run() { //Select data from the database ArrayList dataList = getData(); for(int i=0;i&lt;dataList.size();i++) { String args = dataList.get(i).toString(); ExecutorThread comThread = new ExecutorThread(args...); comThread.start(); } } }; scheduler.scheduleAtFixedRate(uploader, 0, 60 , TimeUnit.SECONDS); } } public class ExecutorThread extends Thread { private variables... public CommunicationThread(args..) { //Initialise private variable } public void run() { //Collect data from sensor //Update Database } } </code></pre>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload