Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>I'll assume that you've checked the JVM settings with which you start Tomcat. Maybe your memory is too low.</p> <p>I'd recommend that you download Visual VM 1.3.3, install all the plugins, start your Tomcat application, and attached Visual VM to the JVM. It'll show you what's happening in memory, CPU, objects created, threads, etc.</p> <p>You showed no code, and you have no data. You'll never solve this problem this way. No one here can help you much, either. Your code is creating too many objects. You need to find out why and stop it.</p> <blockquote> <p>We have business reason to create a single thread for single device and process incoming request.</p> </blockquote> <p>You might have a business reason, but your technical reasons might not be sound. Each HTTP request that comes in has a single thread. Isn't that what you want? When a GPS posts a request you have a single thread to handle it, right? Why must you create many threads with each request? What are those threads doing?</p> <p>Another approach might be to refrain from creating threads. When a request comes in from a device, find some unique tag like a device id and add that message to the session history for that device. I haven't heard any justification for creating threads so far.</p> <p>I don't know if you're taken the trouble to write your own server, but I'd recommend that you look into using Netty. It's an all-Java server based on non-blocking IO that's born to handle high traffic. They know how to handle threads. Maybe you can just use it and add your processing logic to it.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

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