Skip to content
DataMiner DoJo

More results...

Generic selectors
Exact matches only
Search in title
Search in content
Post Type Selectors
Search in posts
Search in pages
Search in posts
Search in pages
Log in
Menu
  • Blog
  • Questions
  • Learning
    • E-learning Courses
    • Open Classroom Training
    • Certification
      • DataMiner Fundamentals
      • DataMiner Configurator
      • DataMiner Automation
      • Scripts & Connectors Developer: HTTP Basics
      • Scripts & Connectors Developer: SNMP Basics
      • Visual Overview – Level 1
      • Verify a certificate
    • Tutorials
    • Video Library
    • Books We Like
    • >> Go to DataMiner Docs
  • Expert Center
    • Solutions & Use Cases
      • Solutions
      • Use Case Library
    • Markets & Industries
      • Media production
      • Government & defense
      • Content distribution
      • Service providers
      • Partners
      • OSS/BSS
    • DataMiner Insights
      • Security
      • Integration Studio
      • System Architecture
      • DataMiner Releases & Updates
      • DataMiner Apps
    • Agile
      • Agile Webspace
      • Everything Agile
        • The Agile Manifesto
        • Best Practices
        • Retro Recipes
      • Methodologies
        • The Scrum Framework
        • Kanban
        • Extreme Programming
      • Roles
        • The Product Owner
        • The Agile Coach
        • The Quality & UX Coach (QX)
    • DataMiner DevOps Professional Program
  • Downloads
  • More
    • Feature Suggestions
    • Climb the leaderboard!
    • Swag Shop
    • Contact
      • General Inquiries
      • DataMiner DevOps Support
      • Commercial Requests
    • Global Feedback Survey
  • PARTNERS
    • All Partners
    • Technology Partners
    • Strategic Partner Program
    • Deal Registration
  • >> Go to dataminer.services

Reasons For System Out Of Memory Exception Connector

Solved659 views6th June 2024outofmemory server
2
Geovanny Galeano [SLC] [DevOps Advocate]725 9th April 2024 0 Comments

The connector that I'm working on started having this issue recently with System.OutOfMemoryException

All the code does is parse an XML response using the Linq XDocument.

Here are the server specs

Running dataminer (10.3.11.0-13456)

Marieke Goethals [SLC] [DevOps Catalyst] Selected answer as best 6th June 2024

2 Answers

  • Active
  • Voted
  • Newest
  • Oldest
1
Floris Cockaerts [SLC] [DevOps Advocate]2.43K Posted 10th April 2024 0 Comments

Hi Geovanny,

Please remember that SLScripting is a 32-bit process and is limited to 4GB of memory.

Consider the amount of memory you need to process your responses, assuming you have the original response in memory as a string, XDocument will double the required memory for its model.
For example, a 1MB large document in UTF-8 (the common encoding used in communication), it will be 2MB in .NET which uses the UTF-16 encoding for strings in memory. Duplicating that for XDocument gives you a total of 4MB consumed to process your response.

On top of that, your stack trace is pointing at a SetParameters call. It's currently marshalling your data from managed .NET to unmanaged C++ memory. This means your data gets copied again. So assuming you roughly have 2MB of data to set, you need to add another copy totalling at 6MB having been consumed if your original response string and XDocument are still held within the same scope.

If your responses are not large enough to reach into gigabytes this way, check if your code is retaining information longer than it should. Are you correctly disposing of items that should be disposed?

There are tools like the visual studio debugger and dotMemory to analyse the managed memory (.NET) in use. Not having any other active protocols or elements can make this analysis a lot easier.

One more thing that might explain the exception you see is the amount of data you are trying to set in a single SetParameters call. If you are reaching into millions of values or gigabytes of memory, the inter-process communication can have trouble with the shared memory and you should consider using multiple requests as long as SLScripting is 32-bit.
I know the best practice is to use as few Notify requests as possible, which is generally true when compared to setting values one-by-one and thus losing a lot of time on moving between processes compared to the cost of SLProtocol handling a single value. At some point though, the cost of notifying SLProtocol will be minimal compared to SLProtocol processing a million values, and splitting the data into manageable chunks will not noticeably slow things down.

Marieke Goethals [SLC] [DevOps Catalyst] Selected answer as best 6th June 2024
0
Tom Waterbley [SLC] [DevOps Catalyst]8.86K Posted 9th April 2024 0 Comments

Hi Geovanni,

Without more context or seeing code it's difficult to say what could be causing the out of memory exception.

Are objects being added to collections (list, dictionary, ...)? If that's the case make sure they are not endlessly growing.

The SLScripting process is also being shared by other elements on the same DMA, so it could be that the problem is actually caused by another element that takes almost all memory. Parsing a bigger amount of data in your connector could then cause the OutOfMemoryException in your connector.

To investigate this further you could take a memory dump of the process. With specific tools it's then possible to see what exactly is being stored in memory.

Tom Waterbley [SLC] [DevOps Catalyst] Answered question 9th April 2024
Please login to be able to comment or post an answer.

My DevOps rank

DevOps Members get more insights on their profile page.

My user earnings

0 Dojo credits

Spend your credits in our swag shop.

0 Reputation points

Boost your reputation, climb the leaderboard.

Promo banner DataMiner DevOps Professiona Program
DataMiner Integration Studio (DIS)
Empower Katas

Recent questions

Web Applications exception in Cube due to invalid certificate 0 Answers | 0 Votes
Redundancy Groups and Alarming – Duplicate Alarms 0 Answers | 0 Votes
Correlation Engine: “Test rule” doesn’t result in a hit, despite functional rule 1 Answer | 3 Votes

Question Tags

adl2099 (115) alarm (62) Alarm Console (82) alarms (100) alarm template (83) Automation (223) automation scipt (111) Automation script (167) backup (71) Cassandra (180) Connector (109) Correlation (69) Correlation rule (52) Cube (151) Dashboard (194) Dashboards (188) database (83) DataMiner Cube (57) DIS (81) DMS (71) DOM (140) driver (65) DVE (56) Elastic (83) Elasticsearch (115) elements (80) Failover (104) GQI (159) HTTP (76) IDP (74) LCA (152) low code app (166) low code apps (93) lowcodeapps (75) MySQL (53) protocol (203) QAction (83) security (88) SNMP (86) SRM (337) table (54) trending (87) upgrade (62) Visio (539) Visual Overview (345)
Privacy Policy • Terms & Conditions • Contact

© 2025 Skyline Communications. All rights reserved.

DOJO Q&A widget

Can't find what you need?

? Explore the Q&A DataMiner Docs

[ Placeholder content for popup link ] WordPress Download Manager - Best Download Management Plugin