Skip to content

tcp-connect error not handled? #3

Open
@DexterLagan

Description

Hi Jay,

When I attempt to run too many tasks in parallel against the Odoo XML-RPC API, I'm getting TCP errors. Nothing special, but this particular error doesn't seem to be caught by exceptions, it just fails with this error:

xxxxx.rkt:195:4: tcp-connect: connection failed
  hostname: xxxxxxxxxxxx.cloud
  port number: 443
  system error: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond.; win_err=10060

The piece of code responsible is this chain starting from an xml-rpc-server:

;; xml-rpc client setup
(define models
  (xml-rpc-server (string->url (string-append *url* *models-path*))))

;; execute a method with keywords
(define execute_kw
  (models 'execute_kw))

;; executes a keyword method given the model, the method and its parameter list
(define (execute model method params)
 (with-handlers ([exn:xml-rpc:fault?                         ; handle XML-RPC exceptions
                   (λ (e) (echo "Error: " (exn-message e)))])
    (execute_kw *db* *uid* *password* model method params '())))

execute_kw itself being the source of this tcp-connect error. I'd guess it's coming from xml-rpc-server, but Racket stops at execute_kw. Any clue?

Thanks!

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions