Integration error between AX 2009 & D365 F&O

Hello All, We are currently performing integration from D365 F&O to AX 2009 through WCF service for multiple tables. When performing transactions, sometimes it starts giving error "The requested operation cannot be performed because you are not logged on to Microsoft Dynamics". Sometimes it gets resolved after a while on it's own, other times it stays for days. We are unable to find the root cause for this issue. If anyone has ever faced this error previously, kindly let us know how we can find the root cause of the issue.

For e.g., When updating production order, we get error as shown below.