Tuesday, February 20, 2018

Draining the AOS

One thing that has always plagued me is when to do system maintenance in AX. I am talking "full blown, kick all the users out" system maintenance. It seems like there is always someone who wants to be working!

I would try to schedule downtime during the standard lunch hour, sending an email alerting people to the potential for downtime. Too many users work through lunch or take later lunches, so my suggestion of running to the local Mexican restaurant fell flat. Sometimes, users just didn't see my company-wide email that I had sent earlier in the day about the upcoming downtime. I also tried to take down the AOS after office hours. That didn't work either because many users always want to be logged in to AX.

Basically, it came down to the fact that I felt like I was always completely inconveniencing someone when I would start system maintenance. I would start getting calls of, "What's wrong with AX?" or "Did someone kick me out?" I just couldn't win!

Unamused emoji - aka Kelly looking annoyed
Me, over here like "Why are you working at 11:00 pm?"

My Wonderful Accidental Discovery

So, imagine my surprise one day while reading through TechNet on a completely separate subject, I discovered the ability to Drain the AOS.

This isn't a fairly obvious solution (Hey Microsoft, where's the Drain the AOS button?), but it is very practical and quite easy to use. It only took me four years to find this, and that's why I am sharing this with you. If I can help someone else out, I am glad to do so. I shared this tip at AXUG Summit in October and at Collaborate Canada in November, and a lot of system administrators were also unaware of this functionality!

Rejecting New Clients

The first step to draining the AOS is to navigate to System administration > Common > Users > Online users. Once there, click on the Server instances tab. Then, click Reject new clients.

Screenshot of Online users form, Server instances tab with arrow pointing to Reject new clients button.
Rejection is hard, this doesn't have to be! 

Once you click Reject new clients, the Status field will read Draining, and users will no longer be able to make a new connection to the AOS and they will see the following message when trying to log in:

Screenshot of infolog users see when trying to access draining AOS

Draining - What Does That Mean?

We have stopped new connections to the AOS. Now, how do we get the existing users out of AX?

The process of draining automatically takes care of this for you. Instead of going into the Client sessions tab of the Online users form and manually ending sessions (also a valid option, but also a good way to make enemies), users are now given an infolog letting them know that the system administrator is shutting down the AOS. The full text of the infolog states, "The administrator is shutting down the Application Object Server. You must save your work and log off. If your user session is idle, you will be logged off automatically." 

Screenshot of infolog alerting users that the AOS is being shut down by the administrator.
"In your face" alerts work much better than company-wide emails.

This alert will pop up after five minutes. After idle for two minutes, the user will automatically be forced off the AOS.

Once the user count is down to your session only, feel free to complete system maintenance. Once completed, stop draining by clicking the Accept new clients button or restarting the AOS service.

This is a life saver. I promise, system maintenance has never been so hassle free!

No comments:

Post a Comment