{"action":"opened","issue":{"url":"https://api.github.com/repos/Azure/iot-edge-opc-publisher/issues/209","repository_url":"https://api.github.com/repos/Azure/iot-edge-opc-publisher","labels_url":"https://api.github.com/repos/Azure/iot-edge-opc-publisher/issues/209/labels{/name}","comments_url":"https://api.github.com/repos/Azure/iot-edge-opc-publisher/issues/209/comments","events_url":"https://api.github.com/repos/Azure/iot-edge-opc-publisher/issues/209/events","html_url":"https://github.com/Azure/iot-edge-opc-publisher/issues/209","id":416625284,"node_id":"MDU6SXNzdWU0MTY2MjUyODQ=","number":209,"title":"Out of Memory Exception when loading large pn.json file","user":{"login":"jmbrunskill","id":8287373,"node_id":"MDQ6VXNlcjgyODczNzM=","avatar_url":"https://avatars3.githubusercontent.com/u/8287373?v=4","gravatar_id":"","url":"https://api.github.com/users/jmbrunskill","html_url":"https://github.com/jmbrunskill","followers_url":"https://api.github.com/users/jmbrunskill/followers","following_url":"https://api.github.com/users/jmbrunskill/following{/other_user}","gists_url":"https://api.github.com/users/jmbrunskill/gists{/gist_id}","starred_url":"https://api.github.com/users/jmbrunskill/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jmbrunskill/subscriptions","organizations_url":"https://api.github.com/users/jmbrunskill/orgs","repos_url":"https://api.github.com/users/jmbrunskill/repos","events_url":"https://api.github.com/users/jmbrunskill/events{/privacy}","received_events_url":"https://api.github.com/users/jmbrunskill/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2019-03-04T04:29:07Z","updated_at":"2019-03-04T04:29:07Z","closed_at":null,"author_association":"NONE","body":"Hi,\r\n\r\nWe are trying to load in an admitted very large published nodes configuration for our IoT Edge deployment.\r\n\r\nIt looks like the System.Text.StringBuilder is failing on startup with an out of memory exception...\r\n\r\n```\r\n[04:22:45 INF] Starting server on endpoint opc.tcp://opcpublisher:62222/UA/Publisher ...\r\n[04:22:46 INF] Server started.\r\n[04:22:46 INF] Using default telemetry configuration.\r\n[04:22:46 INF] The name of the configuration file for published nodes is: ./pn.json\r\n[04:22:46 INF] Attemtping to load node configuration from: ./pn.json\r\n[04:22:49 FTL] Loading of the node configuration file failed. Does the file exist and has correct syntax? Exiting...\r\nSystem.OutOfMemoryException: Exception of type 'System.OutOfMemoryException' was thrown.\r\n   at System.Text.StringBuilder.ToString()\r\n   at System.IO.File.InternalReadAllText(String path, Encoding encoding)\r\n   at System.IO.File.ReadAllText(String path)\r\n   at OpcPublisher.PublisherNodeConfiguration.ReadConfigAsync() in /app/opcpublisher/PublisherNodeConfiguration.cs:line 222\r\n```\r\n\r\nI don't think there is an actual host memory limit being hit, from a quick google it looks like StringBuilder can have issues with very large strings?\r\n\r\n**Version Information**\r\n```\r\nUbuntu 18.04\r\niotedge 1.0.6.1 (3fa6cbef8b7fc3c55a49a622735eb1021b8a5963)\r\nmcr.microsoft.com/iotedge/opc-publisher:2.3.2\r\n```\r\n"}}
{"actor":{"display_login":"jmbrunskill"}}