I have configured Spring ThreadPoolTaskExecutor, trying to have in mind the average load of 1,1k rpm.
@Qualifier("executor")
public Executor asyncExecutor() {
this.threadPoolTaskExecutor.setCorePoolSize(800);
this.threadPoolTaskExecutor.setMaxPoolSize(900);
this.threadPoolTaskExecutor.initialize();
..
}
//sender method
@Async("executor")
@Override
public void sendObject (ObjectFormatter object) {
executor.execute(() -> {
try {
items.forEach(item -> item.send(object));
});
However, after a period of time the POST request for which the async configurations are made suddenly increases up to 5 hours (from the average ms period). More so, usually after those spikes the app stops sending the POST requests.
Response time picture:

What could be the cause of it? I have tried to play around with the core and max pool sizes, but eventually sooner or later the behaviors happens again.