This isn't really a DW problem, but I'm hoping one of you guys may have come accross this problem and know of a solution.
I'm running DW on an Amazon Linux instance, and I'm finding during testing that using curl from the Bash shell to POST a request times out almost immediately if the request takes some time to come back.
I have modified my resource to do nothing, and its response comes back fine, but as soon as the resource takes more than a second or two to respond then I get the curl (52) error message.
Here's a run so you can see what I mean:
* About to connect() to localhost port 9090 (#0)
* Trying 127.0.0.1...
Warning: Keep-alive functionality somewhat crippled due to missing support in
Warning: your operating system!
* connected
* Connected to localhost (127.0.0.1) port 9090 (#0)
> POST /draft/D1/broadcast HTTP/1.1
> User-Agent: curl/7.24.0 (i386-redhat-linux-gnu) libcurl/7.24.0 NSS/3.13.5.0 zlib/1.2.5 libidn/1.18 libssh2/1.2.2 > Host: localhost:9090
> Accept: */*
> Content-Type: application/json
> Content-Length: 377
>
* upload completely sent off: 377 out of 377 bytes
* Empty reply from server
* Connection #0 to host localhost left intact
curl: (52) Empty reply from server
* Closing connection #0
A similar run with the delaying code commented out:
* About to connect() to localhost port 9090 (#0)
* Trying 127.0.0.1...
Warning: Keep-alive functionality somewhat crippled due to missing support in
Warning: your operating system!
* connected
* Connected to localhost (127.0.0.1) port 9090 (#0)
> POST /draft/D1/broadcast HTTP/1.1
> User-Agent: curl/7.24.0 (i386-redhat-linux-gnu) libcurl/7.24.0 NSS/3.13.5.0 zlib/1.2.5 libidn/1.18 libssh2/1.2.2 > Host: localhost:9090
> Accept: */*
> Content-Type: application/json
> Content-Length: 377
>
* upload completely sent off: 377 out of 377 bytes
< HTTP/1.1 200 OK
HTTP/1.1 200 OK
< Date: Wed, 31 Oct 2012 09:39:27 GMT
Date: Wed, 31 Oct 2012 09:39:27 GMT
< Content-Type: application/json
Content-Type: application/json
< Content-Length: 82
Content-Length: 82
<
* Connection #0 to host localhost left intact
{"ok":true,"message":"OK","errorMessage":null,"idType":"BroadcastId","id":"B1"}*
Closing connection #0
I can see the keep-alive warning in there, does anyone know how to not cripple this option on an Amazon Linux box?
The keep-alive switch was the last in several settings I tried adding (max-time & connect-timeout (I was clutching at straws)), but none seem to make any difference.
As far as I can tell from the DW logs everything is going well at the DW end, but it is curl that is crapping out during the test.
Anyone have any ideas?