LP#1268619: websocket gateway: improved memory mgt; logging