Cloudflare in front of Sync Gateway causing timeouts?

40 views
Skip to first unread message

Suresh Joshi

unread,
Jul 7, 2015, 9:24:44 PM7/7/15
to mobile-c...@googlegroups.com
Hey all,

I have an incredibly sporadic issue, and I was wondering if anyone else has ever run into it. I've got Sync Gateway, Couchbase, and an app server sitting on a development server and when I'm testing the login/register, sometimes (1 in 100) the request will completely timeout, and no logs appear on Nginx, my Appserver, or anywhere. It's as though the request never made it through. 

I can see that Cloudflare sends back a 522 or 524 in this situations, but it's really weird, because this is an otherwise unloaded server (2-3 users). 

Could it be that SyncGateway or Couchbase is sucking up TCP connections or something similar? 

I can't fathom why a timeout would pop up otherwise... I'd appreciate any thoughts on the matter.



Thanks!
-SJ

ajres

unread,
Jul 8, 2015, 12:54:37 PM7/8/15
to mobile-c...@googlegroups.com
Do you see this issue if you remove Cloudflare from the communication path and only go through nginx?

We use nginx with our demo SG cluster, we have not seen this issue on that system.

Andy

Suresh Joshi

unread,
Jul 16, 2015, 10:15:57 AM7/16/15
to mobile-c...@googlegroups.com
Hi! It's hard to say, because Cloudflare also handles my SSL.

I know this is causing a problem on Couchbase Mobile - Android, which I've posted to Github.

I've tried upping the server size, and increasing the number of free file descriptors, but I've never seen more than 8200 in-use file descriptors (this is an unloaded system). I'm using Nginx as a reverse proxy for everything - but it's just the fact that I'm not seeing logs about this timeout. It's like the request magically disappeared!
Reply all
Reply to author
Forward
0 new messages