Open seet61 opened 9 months ago
It can be fixed after merging this PR https://github.com/tarantool/cartridge-java/pull/438 . But need to be tested.
@seet61 can you give more details about requests? what types of requests? how many of them? what is the ~packet size? Do you use ProxyTarantoolClient? If you then how many connections between client and cluster?
It could help to reproduce this behavior.
@ArtDu thanks, I will be waiting of them.
My project use tarantool cartridge claster for caching huge responses of master system, SOAP responses from 10kB to 5 MB. Current storage of cluster is 12 routers at 12 VM and 2 VM with 6 replica set of storages.
I'm using TarantoolClient from docs example
private List<TarantoolServerAddress> getShuffledTarantoolServerAddresses() {
List<TarantoolServerAddress> addresses = tarantoolConfiguration.getRouters().stream()
.map(router -> new TarantoolServerAddress(router.split(":")[0], Integer.parseInt(router.split(":")[1])))
.collect(Collectors.toList());
log.debug("addresses: " + addresses);
Collections.shuffle(addresses);
return addresses;
}
@Bean
public TarantoolClient<TarantoolTuple, TarantoolResult<TarantoolTuple>> tarantoolClient() {
return TarantoolClientFactory.createClient()
// You can connect to multiple routers
// Do not forget to shuffle your addresses if you are using multiple clients
.withAddresses(getShuffledTarantoolServerAddresses())
// For connecting to a Cartridge application,
// use the value of cluster_cookie parameter in the init.lua file
.withCredentials(tarantoolConfiguration.getUserName(), tarantoolConfiguration.getUserPassword())
// Number of connections per Tarantool instance
.withConnections(tarantoolConfiguration.getConnectCount())
// Specify using the default CRUD proxy operations mapping configuration
.withProxyMethodMapping()
.withConnectionSelectionStrategy(PARALLEL_ROUND_ROBIN)
.withRetryingByNumberOfAttempts(3)
/*.withRetryingByNumberOfAttempts(5, throwable -> throwable.getMessage().equals("Some error"),
policy -> policy.withDelay(500))*/
.withConnectTimeout(tarantoolConfiguration.getConnectTimeout())
.withReadTimeout(tarantoolConfiguration.getReadTimeout())
.withRequestTimeout(tarantoolConfiguration.getRequestTimeout())
.build();
}
Each client initialise 10 connection to each router. If you need additional information you could send me a message at tg by nickname.
If you work with high load project, and start you app -XX:ReservedCodeCacheSize=512m -XX:MaxMetaspaceSize=512m -XX:MaxDirectMemorySize=256m, after small period 1-2 hours yoe got exception and hisgh cpu of VM.
Without keys everithing is ok
Dependencies:
CPU of VM at problem time