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

Webhook does not give warning or error when http server delay response pass the timeout value #679

Closed
lichenyang2 opened this issue Feb 25, 2015 · 1 comment
Assignees
Labels
Milestone

Comments

@lichenyang2
Copy link

The http server is designed to delay response with specific number of seconds. Sync_gateway config file does not have timeout value specified. The default timeout value should be 60 seconds but when http server delay more than 60 seconds, the sync_gateway still consider it ok.

Case 1: Delay 70 seconds. Note that the gateway log shows that the post is done 15:55:19 and response is received 70 seconds later at 15:56:29, but SGW did not consider it a timeout

15:55:19.475875 CRUD: Stored doc "doc51" / "1-2b12d23e71d2e9fd08626d60346103dd"
15:55:19.476036 HTTP+: #001:     --> 201   (1.4 ms)
15:55:19.477078 Events+: Event queue worker sending event Document change event for doc id: doc51 to: Webhook handler [http://localhost:8081]
15:56:29.481877 Events+: Webhook handler ran for event.  Payload  posted to URL http://localhost:8081, got status 200 OK

Case 2: Delay 120 seconds. Note that the gateway log shows that the post is done 16:00:02 and response is received 120 seconds later at 16:02:02, but SGW did not consider it a timeout

16:00:02.562170 CRUD: Stored doc "doc51" / "1-a5d8bcf4796760363043c4298e6b5423"
16:00:02.562328 HTTP+: #001:     --> 201   (1.4 ms)
16:00:02.562726 Events+: Event queue worker sending event Document change event for doc id: doc51 to: Webhook handler [http://localhost:8081]
16:02:02.568916 Events+: Webhook handler ran for event.  Payload  posted to URL http://localhost:8081, got status 200 OK

The gateway config file does not have timeout specified and therefore should be default to 60 seconds

{
    "adminInterface": ":4985",
    "interface": ":4984",
    "log": ["HTTP", "HTTP+", "CRUD", "Events+"],
    "databases": {
        "db": {
            "server": "walrus:",
            "users": {
                 "GUEST": {"disabled": false, "admin_channels": ["*"] }
            },
            "event_handlers": {
                "document_changed": [
                    {"handler": "webhook",
                     "url": "http://localhost:8081"
                    }
                ]
            }
        }    
    }
}   
@adamcfraser
Copy link
Collaborator

Timeout was disabled pending Jenkins upgrade to go 1.4. Being tracked by issue #605.

@zgramana zgramana modified the milestone: 1.1.0 Jun 11, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants