Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8196401
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T05:27:51+00:00 2026-06-07T05:27:51+00:00

I now have an event processor class which has a Dictionary to store all

  • 0

I now have an event processor class which has a Dictionary to store all the subscriptions. In fact it is a Dictionary of Dictionary. And this process class is communicating with a third-party remote server to make the request for target data. I am asking this question because now we are experiencing some occasionally subscription lost problem. Since for some reason it is hard to verify whether this lost happens in the connection to the remote server, I now have to firstly check whether there is anything wrong with my event processor class. And my first suspect would be if the subscription information is lost due to overflow of this Dictionary object. Does anyone have any idea? Thanks!

UPDATE

perhaps I should tell a little bit more about the scenario, since the code is not really easy to show. We used to have our legacy SW, let’s call it A, to communicate with the remote data service, called B, using the API provided by B’s vendor. However, since we are changing A to 64 bits SW, but the library provided for B is still 32 bits, our new 64 bits A can’t use this library any more. So I am designing a 32 bits SW called C, to use the library to connect to B, while keeping communication with 64 bits A using WCF. Since C is mainly a pub/sub structure, as I mentioned before, I am using a Dictionary of Dictionary to maintain the requests and subscriptions in C. And here comes our problem: we are experiencing some subscription lost (no publication for long time, but after re-initializing subscription we can get the publications) at A. It is not easy for us to check B’s feedback to see whether there is any mis-configuration. And my WCF service log doesn’t show any error there either. I have to suspect the problem happens at C solely. I am aware of multi-threading issue so I have made a lock to every operation of the Dictionary. But I just can’t think of what could be wrong. BTW it is not like C the memory is used up and C got crashed.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-07T05:27:52+00:00Added an answer on June 7, 2026 at 5:27 am

    If by “overflow” you mean “silently lose data unexpectedly” then no, not as far as I’m aware.

    If you mean “use up all the memory in the system until it crashes” then yes, that’s possible, but it doesn’t sound like what’s happening to you.

    If you’re using a standard Dictionary<,> from multiple threads without any locking, that could cause you to lose data. You should either use locking (carefully!) or use ConcurrentDictionary<,> if you’re using .NET 4.

    Also, if you’ve got any duplicate keys that you weren’t expecting, that would overwrite the data for one entry with another entry, if you use the indexer. (It won’t if you use the Add method – it will throw an exception instead.

    Basically we’re guessing until we see some code or at least get more context though…

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a page which has many event handlers. The code now reached 1000+
I have this code in a xaml file now in a event handler code
PROBLEM: I have a Child class which uses DataContractSerialization and raises a Changed event
I currently have event.stopPropagation() to work on a few selectors, but now I need
As indicated in title, right now I have captured the event when the session
Right now I have the following code working: @UiHandler(usernameTextBox) void onUsernameTextBoxKeyPress(KeyPressEvent event) { keyPress(event);
We have been discussing this at work and now I am even more confused
I now have a running Java program which only lacks of the final step,that
I have a Java class in which every method was defined as static .
I have an arbitrary number of lists which I would like to process using

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.