OPC UA SERVER

OPC UA SERVER

In My project I have 100000 variables and all variables need on OPC UA client requirement therefore I created 5 separate instances of Zenon Process gateway which different from port number  I created 5 function for starting all instances and script for combine all functions I am executing this script after 20 second of service engine started all instances started but first instance showing unhandled exception error 
please suggest how to resolve this issue 

How can I take feedback in service engine if Process gateway is started or not?