Uplink doing odd things

I am getting uplink disconnected errors for a running uplink script when calling functions within it.

However, sometimes the function has run correctly (logs on the uplink server show this to be so), and sometimes not.

Please let me know what more info you need to debug this.