Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Out of memory error #40

Closed
choudhary001 opened this issue Mar 11, 2016 · 4 comments
Closed

Out of memory error #40

choudhary001 opened this issue Mar 11, 2016 · 4 comments

Comments

@choudhary001
Copy link

Hi,
I see below out of memory error. The stack trace shows a stompit module. Do you know what could be the cause of this? I have a lot of updates coming from ActiveMQ server.

$> node index.js

Connecting to mqbrokerprod:61613
Connected to mqbrokerprod:61613, with options: {"host":"mqbrokerprod","port":61613,"connectHeaders":{},"ssl":false}

<--- Last few GCs --->

 1774616 ms: Scavenge 1397.6 (1456.6) -> 1397.6 (1456.6) MB, 4.7 / 0 ms (+ 2.0 ms in 1 steps since last GC) [allocation failure] [incremental marking delaying mark-sweep].
 1775820 ms: Mark-sweep 1397.6 (1456.6) -> 1397.5 (1456.6) MB, 1203.8 / 0 ms (+ 3.0 ms in 2 steps since start of marking, biggest step 2.0 ms) [last resort gc].
 1777215 ms: Mark-sweep 1397.5 (1456.6) -> 1397.3 (1456.6) MB, 1395.3 / 0 ms [last resort gc].


<--- JS stacktrace --->

==== JS stack trace =========================================

Security context: 0x6ddfd937399 <JS Object>
    1: _parseHeaderLine(aka /* anonymous */) [/u/choudhab/activemq/djs/stomp-client/node_modules/stompit/lib/IncomingFrameStream.js:~228] [pc=0x3bb47cf118e3] (this=0x2a35b111e079 <an IncomingFrameStream with map 0x21e609c90ad9>)
    2: _continueTransform [/u/choudhab/activemq/djs/stomp-client/node_modules/stompit/lib/IncomingFrameStream.js:111] [pc=0x3bb47ce98c55] (this=0x2a35b111e079 <an Incomi...

FATAL ERROR: CALL_AND_RETRY_LAST Allocation failed - process out of memory
Abort (core dumped)
@choudhary001
Copy link
Author

I think I ran into #13.

Why is it necessary to do mesage.ack() for auto ack mode. STOMP specification says there is no need for client to send ACK to server in this mode. Is this an API requirement ?

Thanks,
Abhishek

@gdaws
Copy link
Owner

gdaws commented Mar 11, 2016

Until recently it was a requirement of the API to use message.ack() in any ack mode. It forces application code to be ack-mode agnostic, which can potentially prevent errors if the ack mode is specified in config.

But this requirement is now deprecated (in master) and applications are expected to fully manage ACK messages themselves.

@gdaws gdaws closed this as completed Mar 11, 2016
@choudhary001
Copy link
Author

Do the application still need to do "message.ack()" even if the subscription header 'ack' is set to 'auto'?

I didn't understand 'applications are expected to fully manage ACK messages themselves.' Do the application need to acknowledge all messages regardless of 'ack' mode?

@gdaws
Copy link
Owner

gdaws commented Mar 14, 2016

Yes you still have to use message.ack() even if the subscription is in auto ack mode.

But in the next version of stompit (probably v0.23), using message.ack() in an auto ack subscription will be optional, and client mode subscriptions will no longer be managed. The method message.ack will be deprecated, and the recommended way to send an ACK message is with client.ack(message)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants