socket timeout error

44 views
Skip to first unread message

Frédéric Logier

unread,
May 3, 2013, 4:39:38 PM5/3/13
to zer...@googlegroups.com
Hi !

I need to POST a 60Mo file to zerogw. I set timeout: 600 under my route "/payload*":. Anyway my curl POST failed with an 55 error (Failed sending network data) after 2 minutes.
I have seen with zerogw -P an inactivity-timeout: 120 should I set this setting to 600 somewhere ?

My yaml file is :

Server:
  max-requests: 100
  zmq-io-threads: 2
  disk-io-threads: 2
  listen:
    - host: 0.0.0.0
      port: 8000
  control:
    socket:
    - !zmq.Bind ipc:///tmp/zerogw-ctl
  error-log:
    level: 5
    warning-timeout: 300
  mime-types:
    extra:
      yaml: text/x-yaml
      mov: application/x-movable

Estp:
  socket: !zmq.Pub
  - ipc:///tmp/zgwestp.sock

Routing:
  routing: !Suffix ~
  routing-by: !Header Host
  map:
      "*:8000":
        routing: !Prefix ~
        routing-by: !Uri ~
        map:
            "/*":
              static:
                enabled: yes
                root: examples
                restrict-root: no
                index-file: websocket.html
                deny-suffixes:
                - .py
                - .yaml
                deny-prefixes:
                - "."
            "/ws/*":
              static:
                enabled: yes
                root: examples
                restrict-root: no
                single-uri: /websocket.html
            "/echo*":
              zmq-forward:
                enabled: yes
                socket:
                - !zmq.Bind "tcp://127.0.0.1:7001"
                contents:
                - !Uri ~
                - !Body ~
                timeout: 2
                retry: !RetryFirst
                  count: 3
            "/payload*":
              limits:
                max-body-size: 512Mi
              zmq-forward:
                enabled: yes
                socket:
                - !zmq.Connect "tcp://127.0.0.1:2502"
                - !zmq.Connect "tcp://9.0.0.6:2503"
                contents:
                - !Method
                - !Uri
                - !Header X-user-token
                - !Header X-node-uuid
                - !Header X-node-password
                - !Header X-workflow-uuid
                - !Header X-payload-filename
                - !Header X-payload-type
                - !Header X-payload-mime
                - !Header X-payload-action
                - !Body ~
                timeout: 600
            "/node*":
              zmq-forward:
                enabled: yes
                socket:
                - !zmq.Connect "tcp://9.0.0.6:2504"
                contents:
                - !Method
                - !Uri
                - !Header X-user-token
                - !Header X-node-name
                - !Body ~
                timeout: 2
                retry: !RetryFirst
                  count: 3
            "/workflow*":
              zmq-forward:
                enabled: yes
                socket:
                - !zmq.Connect "tcp://9.0.0.6:2505"
                contents:
                - !Method
                - !Uri
                - !Header X-user-token
                - !Header X-workflow-name
                - !Body ~
                timeout: 2
               retry: !RetryFirst
                  count: 3
            "/user*":
              zmq-forward:
                enabled: yes
                socket:
                - !zmq.Connect "tcp://9.0.0.6:2506"
                contents:
                - !Method
                - !Uri
                - !Header X-admin-token
                - !Body ~
                timeout: 2
                retry: !RetryFirst
                  count: 3
            "/crossdomain.xml":
              responses:
                default:
                  headers:
                    Content-Type: text/xml; charset="utf-8"
                  body: |
                    <?xml version="1.0"?>
                    <cross-domain-policy>
                        <allow-access-from domain="*" />
                    </cross-domain-policy>

Paul Colomiets

unread,
May 3, 2013, 6:08:16 PM5/3/13
to zer...@googlegroups.com
Hi Frédéric,

On Fri, May 3, 2013 at 11:39 PM, Frédéric Logier <fre...@gmail.com> wrote:
> I need to POST a 60Mo file to zerogw. I set timeout: 600 under my route
> "/payload*":. Anyway my curl POST failed with an 55 error (Failed sending
> network data) after 2 minutes.

Try to raise `network-timeout` in `Server` section. If that works for
you, it's probably a bug in libwebsite, as the value is meant to be
keep-alive timeout (and it looks like there is a bug by skimming the
code)

> I have seen with zerogw -P an inactivity-timeout: 120 should I set this
> setting to 600 somewhere ?
>

No, that's polling timeout for websocket emulation.

--
Paul

Frédéric Logier

unread,
May 3, 2013, 7:31:14 PM5/3/13
to zer...@googlegroups.com
Thanks Paul it's ok now with network-timeout: 600.


2013/5/4 Paul Colomiets <pa...@colomiets.name>

--
You received this message because you are subscribed to the Google Groups "Zerogw" group.
To unsubscribe from this group and stop receiving emails from it, send an email to zerogw+un...@googlegroups.com.
To post to this group, send email to zer...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.





--
http://fredix.wordpress.com
Reply all
Reply to author
Forward
0 new messages