6 Replies Latest reply on Dec 17, 2013 7:08 AM by ataylor

    max-size-bytes not being honored

    dlmarion

      Looking for some help on where I am going wrong with configuration. See my other post about message counters, this one is about the max-size-bytes configuration parameter. It seems in 2.3.0.Final it is not being honored. I wrote up another example (see attached), it can be run with 'mvn verify'. In this example I set the max-size-bytes parameter to 10Mb. Then, I send 50 1Mb messages to the queue with an address full policy of DROP. The message counter goes to 50 and my consumer receives all 50. This is an example of what I am seeing on my project. I set the max-size-bytes to about 7/8 of the JVM heap size and I am continually running into an OOME. Any help would be appreciated.

        • 1. Re: max-size-bytes not being honored
          ataylor

          You are sending 1Mb messages so they will be treated as large messages which are treated as file messages and sent in parts and saved on disc so the actual memory footprint is very small. Take a look at the user manual to see how to configure large message size or change your example to use smaller messages. I would probably do the latter since sending a large message in one chunk may cause issues with bottle necking the pings but this will be dependent on your network speed.

          • 2. Re: max-size-bytes not being honored
            dlmarion

            Curious about what happens when you have large messages and persistence is false. Are they kept in memory? Could this be the cause of my OOME?

            • 3. Re: Re: max-size-bytes not being honored
              dlmarion

              ataylor: I think I figured it out. I changed the messages to 1K and set the max-queue-size to 10MB. With persistence set to true, it works. If set to false, OOME! I think I found my problem. I was trying to run without persistence to reduce the I/O on the server (I don't care about lost messages). Looks like I can't do this as I can't keep the server up and running. Should I file a bug?

              • 4. Re: Re: max-size-bytes not being honored
                ataylor

                yes if you dont use persistence then everything is kept in memory so I would expect an OOM if you overload the memory, although this is not a bug. If you dont want messages persisted then you should send them non persisted or run with enough memory.

                • 5. Re: max-size-bytes not being honored
                  dlmarion

                  Can you elaborate on how to do this? I'm creating a non-durable message with session.createMessage(type, false); Where do you set persistence=false?

                  • 6. Re: max-size-bytes not being honored
                    ataylor

                    thats exactly how you do it, you can also make your queues non durable