SG from master + official CBL 1.0.4: WebSocket problems "libBacktraceRecording.dylib: allocate_free_list_pages() -- virtual memory exhausted!"

116 views
Skip to first unread message

Alexander Selling

unread,
Apr 13, 2015, 8:07:02 AM4/13/15
to mobile-c...@googlegroups.com
Hi! 

Ever since I upgraded to to SG from master(to get rid of the 'giving up' issue) I've started to get crashes (allocate_free_list_pages() -- virtual memory exhausted) upon full sync with the Official CBL 1.0.4. Do I have to run CBL from master?
What happens is that the web socket thread seems to be claiming memory perpetually and when it hits a couple of giga bytes the simulator crashes, I guess that'll be heavily dependent on what environment you're in.

first part of the debug window:

second part of the debug window:

thread backtrace all:
http://pastebin.com/cwbipvxM

Alexander Selling

unread,
Apr 13, 2015, 9:15:09 AM4/13/15
to mobile-c...@googlegroups.com
Is there a way to force CBL to use long polling instead of web sockets? There doesn't seem to be any fallback, when I disable web sockets in nginx CBL can't sync anymore.

Traun Leyden

unread,
Apr 13, 2015, 10:16:40 AM4/13/15
to mobile-c...@googlegroups.com
--
You received this message because you are subscribed to the Google Groups "Couchbase Mobile" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mobile-couchba...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/mobile-couchbase/6c4fd92a-e1e6-47b4-8a1b-3462981b77b4%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Alexander Selling

unread,
Apr 13, 2015, 11:20:06 AM4/13/15
to mobile-c...@googlegroups.com
Awesome!

Any chance that you also know how to slow down the poll frequency? it's shooting away a million requests to _changes right now, keeping my cpu at a steady 70% load.

Jens Alfke

unread,
Apr 13, 2015, 12:03:25 PM4/13/15
to mobile-c...@googlegroups.com
On Apr 13, 2015, at 5:07 AM, Alexander Selling <alexande...@gmail.com> wrote:

Ever since I upgraded to to SG from master(to get rid of the 'giving up' issue) I've started to get crashes (allocate_free_list_pages() -- virtual memory exhausted) upon full sync with the Official CBL 1.0.4. Do I have to run CBL from master?

Please always indicate what platform you’re using. (In this case I figured out it’s iOS.) We have three client implementations now and I only contribute to one of them, so it gets hard to triage the incoming support requests when I can’t figure out whether a message applies to me or not.

What happens is that the web socket thread seems to be claiming memory perpetually and when it hits a couple of giga bytes the simulator crashes, I guess that'll be heavily dependent on what environment you're in.

Please also report bugs using the Github issue tracker. It’s fine to also bring them up on the list, posting a link to the issue. But problems that only get reported on the mailing list can fall between the cracks and not get tracked properly for sprint planning, and the continued discussion wastes bandwidth for list members who don’t find the issue relevant.

Once you’ve filed an issue I’ll be glad to look at it.

—Jens

Adam Fraser

unread,
Apr 20, 2015, 1:32:50 PM4/20/15
to mobile-c...@googlegroups.com
Hi Alexander,

In either case (websockets or longpolling), I'd like to better understand the Sync Gateway behaviour you're seeing.  Both cases sound a bit like SG is repeatedly sending the same changes results (resulting in excessive traffic on the websocket, and high request iteration for longpoll).  If that's the case, I second Jens' suggestion that you file a github ticket with some additional details so that we can try to reproduce, and fix if it's an issue on the Sync Gateway side.

Thanks!
Adam   

Reply all
Reply to author
Forward
0 new messages