Closed wwerner closed 5 years ago
@wwerner This looks exactly like the problem resolved a few days ago. Please do the following:
- rm ~/.m2/repository/io/vlingo/
$ cd {vlingo_root}/vlingo-symbio-jdbc
$ ./pgbounce.sh
$ cd ../vlingo-lattice-exchange-rabbitmq
$ ./rmqbounce.sh
$ cd ../vlingo-platform
$ ./gradlew
$ mvn clean install
Then run the server. Does that fix the problem?
No, I was already running against the most current master of all dependencies.
Looking at the heap, practically all memory is used in 2 ConsumerByteBufferPools
s à 1.6G
Looking at the code, this totally makes sense. In https://github.com/vlingo/vlingo-schemata/blob/master/src/main/java/io/vlingo/schemata/Bootstrap.java#L71, we start the server w/ a 16M max message size w/ 2 dispatchers & the default maxBufferPool of 100. => 3.2G
Thanks @VaughnVernon for the pointers.
Probably the ConsumerByteBufferPool needs to be lazy-loaded. Why are we binding the max message size with the pool? Is it just simpler?
I would say to reduce the size of the pooled ByteBuffer to 16K (for example, can be configured) and create on-demand temporal ByteBuffers only if the expected message size is bigger.
Probably this issue needs to be tackled in vlingo-http.
WDYT @aleixmorgadas , @VaughnVernon ?
We should support custom buffers for special case sizes.
After the recent updates to
vlingo-wire
(I suspect somewhere around https://github.com/vlingo/vlingo-wire/pull/13 and https://github.com/vlingo/vlingo-wire/compare/12f372d49439...10c9ded38288 ), the server consumes roughly 4GB of memory. Trying to start the server w/ less memory leads to failures like in the exception below. After giving the server 3.8G Xmx, startup works as expected.This occured first in CircleCI b/c the server is killed by the system for consuming too much memory. After setting
-Xmx
to sth. below3800m
, the following exceptions are thrown.