automaticmode / active_workflow

Polyglot workflows without leaving the comfort of your technology stack.
https://www.activeworkflow.org
Other
830 stars 67 forks source link

TCP Timeout for Remote Agents / Async HTTP #6

Closed MarcelPa closed 4 years ago

MarcelPa commented 4 years ago

Hey everyone,

I am running into TCP timeouts with remote agents that take some time to finish. I have raised the RACK_TIMEOUT_SERVICE_TIMEOUT setting in .env with no luck. On the remote agent side, I tried to enable async http, again no luck (active workflow will error out with Net::ReadTimeout with #<TCPSocket:(closed)>

I assume the relevant error output is:

/app/vendor/bundle/ruby/2.6.0/gems/faraday-0.17.3/lib/faraday/connection.rb:175:in `post'
/app/vendor/bundle/ruby/2.6.0/gems/faraday-0.17.3/lib/faraday.rb:102:in `method_missing'
/app/lib/remote_agents.rb:96:in `perform_request'
/app/lib/remote_agents.rb:108:in `remote_action'
/app/lib/remote_agents.rb:55:in `receive'

Any ideas on how to solve this? Cheers, Marcel

MarcelPa commented 4 years ago

With the help of my colleague I have found a much better solution: Start a remote agent with Receive und check on it afterwards with Check. Looking at the API, this actually seems much more useful than my envisioned solution of asynchronous HTTP calls.

TL;DR: issue resolved by designing the remote agents properly.