Web Connection
Error during 'UpdateExe.wc'
Gravatar is a globally recognized avatar based on your email address. Error during 'UpdateExe.wc'
  Scott R
  All
  Feb 7, 2019 @ 01:32pm

Rick,

I'm using your built in 'UploadExe.wc' and then 'UpdateExe.wc' methods to post updates to my servers.

The uploadExe works perfectly. However the updateExe.wc seems to only work when there is little / no traffic on my server. If we have steady (1-2+ calls per second) on the server, I get back the following:

Is there any way around this? I thought that when I called this url (updatexe.wc) that it put all requests on hold and then updated the exe. If there is a request running how long does it wait before it decides that it can't update the exe? We broker a lot of SQL connections and every once in a while a SQL connection takes 20ish seconds to time out (not great I know but some of our customers have less than desirable internet connections and we have to try a few times). I'd rather have it wait 30 seconds and then apply the update than have it wait 10 and then fail....

Thanks,

Scott

Gravatar is a globally recognized avatar based on your email address. re: Error during 'UpdateExe.wc'
  Rick Strahl
  Scott R
  Feb 7, 2019 @ 03:11pm

If there are still running instances the update the hotswapping will fail. So if you have requests that are draining the pipeline of a busy server that are waiting for completion the fully automated update probably won't work.

On a busy server like your's the typical scenario is to run on a load balancer, and then update machines one at time while you take them off the load balancer briefly.

The other alternative is to do this manually. Build and do the publish which will get the file up there, and maybe even swap the server. If not you can manually put the server requests on hold and if necessary kill any additional instances. Then do the Update Exe from the Web site to swap in and turn off the Hold Requests.

I realize this is not ideal but unfortunately due to the complications of using COM objects that are essentially external to the Web server.

The only alternative is to build a custom process to handle this that can run on the server and that can explicitly kill all instances. It could be done with a .NET module/handler (written in .NET) or an external EXE.

Gravatar is a globally recognized avatar based on your email address. re: Error during 'UpdateExe.wc'
  Scott R
  Rick Strahl
  Feb 7, 2019 @ 03:53pm

Rick,

You mentioned 'you can manually put the server requests on hold.'

How do I do this? I can shut down IIS / the app pool but that doesn't put them on hold, it (in essence) kills the requests. How can I put all new requests on hold?

Thanks.

Gravatar is a globally recognized avatar based on your email address. re: Error during 'UpdateExe.wc'
  Rick Strahl
  Scott R
  Feb 7, 2019 @ 05:07pm

There's a link on the module admin page. It'll prevent new, non-authenticated requests from hitting the server.

You can also hit that link from code - it's a toggle:

https://yoursite.com/wconnect/admin/HoldRequests.wc 

but the updater is already doing this. The problem in your case is timing and that the servers are not shutting down quick enough for the file to be updated.

Once On Hold you can unload and wait or switch to file and kill all instances, the hit the Update Server Exe button to swap. This will work but it's a manual process. With some patience it's possible to automate this process from the client PRG file as well, but it'll take some experimenting to get this right (which is why I don't automate that today in the bld_app.prg file.

I suppose there is some logic that could be built into the updater (in the .NET module at least) to check running instances and if it sees any keep waiting for a timeout, and if they are still there, hard kill them all.

IAC, if this is something you want to have implemented, we can discuss this privately as this is somewhat specialized to your needs.

I think in your high volume scenario you will very likely end up in a load balanced scenario where it'll be easier to take servers out of rotation briefly, update them, then put them back into the load balancing pool.

Gravatar is a globally recognized avatar based on your email address. re: Error during 'UpdateExe.wc'
  Scott R
  Rick Strahl
  Feb 8, 2019 @ 07:20am

Rick,

Thanks. I didn't see the 'hold' option. It sounded like something that would go next to the unload / load servers options and so I was looking in the wrong place. I'll see what I can figure out and if we need the update enhanced by you I'll email you and we'll figure it out.

Thanks,

Scott

© 1996-2019