Re: ContextSwitchDeadlock



Have you tried to access the two data sources with a Linked Server approach
that lets SQL Server do all of the processing?

--
____________________________________
William (Bill) Vaughn
Author, Mentor, Consultant
Microsoft MVP
INETA Speaker
www.betav.com/blog/billva
www.betav.com
Please reply only to the newsgroup so that others can benefit.
This posting is provided "AS IS" with no warranties, and confers no rights.
__________________________________

"OldButStillLearning" <OldButStillLearning@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote
in message news:E2D8FB44-DA7A-4629-80BE-C804D86D8F08@xxxxxxxxxxxxxxxx
Hello, I am getting this "ContextSwitchDeadlock" error message pop up in
situations where I am doing a Data Reader loop, where I am processing
about
40,000 records. For each record read via the data reader, I am creating
another data reader to read another database table (can't join these
tables -
on different machines) to get additional information. I am guessing that
I
am getting this error message becuase the loop is taking longer the 60
seconds to complete. Here is what is said about the error
"The most probable cause is that a single-threaded apartment (STA) thread
is
not pumping messages. The STA thread is either waiting without pumping
messages or is performing lengthy operations and is not allowing the
message
queue to pump."

I'm sorry, but I do not have a clue as to what this means. The other
probable cause is a process is consuming too much memory. Not sure That
this
would apply to me but perhaps opening and closing 40,000 data readers is
sucking up memory, although I would have expected the garbage collector to
have released this memory, but perhpas because it is all within the same
paragraph, the memory is not being release. I often just cancel out of
the
error message and continue with the process and it completes successfully,
so
I don't think it is a memory issue.
If I do not run in debug mode, I get the same error message running in
"Release" mode.

I read that you can turn off the MDA errors via the config file, but this
does not seem to me to be the appropriate solution to the problem... Does
it?

Any ideas or suggestions?

Thanks in advance for your assistance!!!!


.



Relevant Pages

  • Re: ContextSwitchDeadlock
    ... For each record read via the data reader, ... | am getting this error message becuase the loop is taking longer the 60 ... | queue to pump." ... | probable cause is a process is consuming too much memory. ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: Software will not run with more than 512MB RAM installed
    ... > The following error message appears every time I attempt to open a ... > Windows ME, Windows XP ... > Total Physical Memory 1,024.00 MB ... > with 64MB RAM, no error. ...
    (microsoft.public.windowsxp.help_and_support)
  • Re: Blue Screen of Death HELP
    ... I have now disabled automatic restart and await the next recurrence. ... The memory stick DDR2 was replaced when the problem arose but it was a 'pre-owned' stick which functioned after install and well before the problem. ... the My Computer icon on the Desktop and select Properties, Advanced, ... Same question applies to the other error message. ...
    (microsoft.public.windowsxp.general)
  • Re: PAGE_FAULT_IN_NONPAGE_AREA
    ... In Device Manager the Network Card appears under Network Adapter. ... Don't forget the problem could be hardware not software. ... Background information on Stop Error message ... Requested data was not in memory. ...
    (microsoft.public.windowsxp.general)
  • Re: cant stop xp pro reboot loop
    ... You receive a "Stop 0x0000000A" error message in Windows XP ... Requested data was not in memory. ... How many sticks of RAM memory does the computer have? ... Disable automatic restart on system failure. ...
    (microsoft.public.windowsxp.help_and_support)