So I have an object that I'm exposing via .NET remoting (for historical / political reasons I can't just drop this and go to something more modern), which I use to process a list of items, one call per item in my list. The remoting server is set up as Single call rather than Singleton, and so my understanding is that I should get a new instance of the server class on each invocation - i.e. for each item in my list.
This seems to work just fine for small datasets, but when I push it a little by processing a list containing approx. 200K items, it reaches around 19K processed, I see a timeout, and the call fails with a socket exception - "A connection attempt failed because the connected party did not properly respond after a period of time or established connection failed because connected host has failed to respond". The next call then succeeds and processing continues...but then fails again later.
There seems to be no significance in the number of records processed - this varies from around 19K to 19.1k and fails at different points and with different records.
Additionally, when I run the system in multi-threaded mode (Parallel.ForEach() & MaxDegreeOfParallelism == -1), then I'm seeing the same "profile" of failures, but instead of a single record fail followed by the next "working", I'm seeing about 10 failures before it comes back to life - which leads me to believe it's something like the server actually dying and being re-instantiated.
Anyone have any ideas? I can batch out the data and get a "new" remoting connection if I create a factory to do so (I'm injecting my remoting client), but this seems like avoiding the problem rather than understanding the cause and fixing it. Ultimately this will be used to process > 1.2M records
C# has already designed away most of the tedium of C++.
I would pass the whole lot of records at one time. Not only is it going fubar after 19k records, but if you process 1.2M records, imagine how much time you are adding with the network latency between each record.
The difficult we do right away...
...the impossible takes slightly longer.
I am currently working on monitoring the folder on desktop. When the hex data files are dragged into the "Monitored" folder, it would automatically start to analyze the hex files and create the interpreted files into other folder.
I have created the Local Service process "Interpreter Service". The thing is that when I started the service then it abruptly stopped running. Upon checking Event Viewer, it reported the error:
Service cannot be started. System.ArgumentException: The directory name C:\Users\RBWorkstation\Desktop\Monitored Folder\ is invalid.
at System.IO.FileSystemWatcher.set_Path(String value)
at InterpreterService.UM_InterpreterService.OnStart(String args)
at System.ServiceProcess.ServiceBase.ServiceQueuedMainCallback(Object state)
The folder is right on my desktop! So anyone have any suggestion on how to fix this so this service can find the folder?
There are multiple accounts on your machine. Regardless of you logging in as admin, normal services do NOT run with those rights. Open the services, find yours, right-click, and check which user.
Chances are it's "SYSTEM", wich does not have the same rights as your admin-account. The reason for that is that the service runs before someone (like you as admin) can loging and prove who he/she is - the service will already be started with the credentials provided.
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
Apparently you already know that C# is a programming language, or else you wouldn't have had the idea to ask about it here. So if you know that C# is a programming language, why don't you ask a more specific question that can be answered without writing an essay, which is already written, anyway (you do know Google, right?): C Sharp (programming language) - Wikipedia, the free encyclopedia[^]
If the brain were so simple we could understand it, we would be so simple we couldn't. — Lyall Watson
C♯ (C-sharp) is a musical note lying a chromatic semitone above C and a diatonic semitone below D. C-sharp is thus enharmonic to D♭. It is the second semitone in the French solfège and is known there as do dièse. In some European notations, it is known as Cis. In equal temperament it is also enharmonic with Bdouble sharp (Hisis).
When calculated in equal temperament with a reference of A above middle C as 440 Hz, the frequency of C♯4 (the C♯ above middle C) is about 277.18 Hz. See pitch (music) for a discussion of historical variations in frequency.