Closed serialbandicoot closed 1 year ago
This is working as designed.
For Membrane Service Proxy to reload its configuration, the following steps need to be completed:
You are stuck in step 2. Step 2 will not complete, until your target server (localhost:1080) has responded to all HTTP requests (that were already running when the restart process started at step 1) and all HTTP clients have completely received their responses.
There is a timeout for waiting for step 2 to complete. The default value for this is 30 seconds. After this time, Membrane Service Proxy will not wait any longer, but simply close the incoming TCP connection and continue with step 3.
You can change this timeout using <transport forceSocketCloseOnHotDeployAfter="30000" />
. See also
http://membrane-soa.org/service-proxy-doc/4.0/configuration/reference/transport.htm .
E.g.
<router>
<transport forceSocketCloseOnHotDeployAfter="30000">
<ruleMatching/>
<dispatching/>
<userFeature/>
<httpClient />
</transport>
<serviceProxy ...>
...
</serviceProxy>
</router>
If you don't have a problem with TCP connections simply getting closed when you do a Membrane Service Proxy configuration reload, feel free to lower this value. Then the restart process will complete quicker.
I've tried your suggestion with the following and repeated my steps above.
<router> <transport forceSocketCloseOnHotDeployAfter="30000"/> <serviceProxy port="20000" > <log headerOnly="false" level="DEBUG"/> <target host="localhost" port="1080"/> </serviceProxy> </router>
The Warning message continues after 30 seconds and it seems that the forceSocketCloseOnHotDeployAfter does not move onto step 3 as suggested.
UPDATE: I also change the timeout to 1 and now I get the following Warning:
WARN HttpTransport:126 - Still waiting for running exchanges to finish. (Set <transport forceSocketCloseOnHotDeployAfter="1"> to a lower value to forcibly close connections more quickly.
I get the following message continuously outputting to the console and it only stops when I restart membrane.
WARN HttpTransport:126 - Still waiting for running exchanges to finish. (Set <transport forceSocketCloseOnHotDeployAfter="30000"> to a lower value to forcibly close connections more quickly.
This will cause the Warning above to keep logging to the output even though the original GET request has been killed.
This has been resolved by changing the <router> to <router hotDeploy="false">
However this does mean that we can no longer perform hot deploys for fear of triggering this issue.