![]() ![]() If neither of the two is resolvable, a SimpleAsyncTaskExecutor will be used to process async method invocations. ![]() You can also or By default, Spring will be searching for an associated thread pool definition: either a unique TaskExecutor bean in the context, or an Thread-Pool-Executor bean named "taskExecutor" otherwise. write your own custom Thread-Pool-Executors with better Core-PoolSize, Max-PoolSize, Queue-Capacity. The third problem was, the way you have used multi-threading solution in our application logic in spring batch configuration i.e.Hard to map complex query results to arbitrary classes.Hard to create complex queries with JPQL/HQL.Lack of control over generated SQL queries.Spring Data JPA could be very slow sometimes, specially it raises below concerns Second problem was the Spring Data JPA repository, We were using Spring Data JPA repository to delete records from the source.Spring Batch writer by design give you items/records to process, but you can optimize batch chunk processing if you tune your application logic in one scope. The first Problem was, all the application logic in batch writer processing were in different scopes.So idea is to identify code smell in your application thoroughly. Well this lead us to the deadlock issues, which is very hard to troubleshoot when spring batch is doing the most of the work behind the scenes. It was bringing the new or updated data to the application and also doing auditing and deleting the records from the source. In my case, our application was reading the records in chunks from the source and writer writing to the destination, our writer has multiple jobs to do within. Application coding logic could be triggering the same.Performing bulk processing in the batch.High load on the Database like bulk read/write/delete.The reason for deadlock could be many when you are working database tables(in our case). Well, when you are reading this article, you might have already faced issue of a deadlock in spring batch which is doing multi threaded bulk processing. ![]()
0 Comments
Leave a Reply. |