Re: Connection hanging after using(....) construct



Thanks for the update - that is indeed strange. You can try SQL Compact 3.5 now if you like. It's available as part of VS 2008 beta 2 and also as a separate download. I am also interested to know if you have the same odd behavior there. If you do find the same behavior with 3.5, now is a good time to report it as the team is in bug-hunting mode.

If you have a very small sample including code to create the database, you can email it to me (remove .online from my address here) and I will try it with 3.5.

--
Ginny Caughey
Device Application Development MVP


<d.wiss@xxxxxxx> wrote in message news:1188976902.777791.58810@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Latest news:
We can avoid the problem with the hanging worker thread at the
connection.Close() line if we execute a query in the main process only
once.
Now, at the beginning of the main process and _before_ the worker
thread is started a simple query is executed and the "problem" is
gone.

There is somethings strange we don't understand and this topic is keep
in our mind. I saw that MS will have a new version soon (V3.5) and we
will test the original code against to check if there this problem is
solved.

On 30 Aug., 14:01, "Ginny Caughey [MVP]"
<ginny.caughey.onl...@xxxxxxxxxxxxxx> wrote:
I'm glad to hear you're Closing <g> in on the problem now!

--
Ginny Caughey
Device Application Development MVP

<d.w...@xxxxxxx> wrote in message

news:1188474302.363620.247840@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

>I made a little console test application with two threads.
> Each thread is connecting to the database, read from two tables in
> alternating Table1 and Table2 and finally closes the connection. and
> all this in a for loop of 100 times with little different timeouts to
> have asynchronuous task switches.
> Without any problem!!

> For testing instead of an endless loop we made a timeout of 30 seconds
> to automatically stops the test cases if a thread is blocking again.
> We found out once the connection.Close() is blocked and the timeout in
> the main process is exceeded and the heap gets clean-up from the used
> objects from the main process, the blocking worker thread could finish
> it's close statement. Now we dig more into this way.

> To anwer your question: the iterations differs each time.

> Never mind but thank you for help anyway.

> On 28 Aug., 16:43, "Ginny Caughey [MVP]"
> <ginny.caughey.onl...@xxxxxxxxxxxxxx> wrote:
>> One other thing you might try is making sure each thread has its own
>> connection, although in your testing I don't know if multiple threads
>> were
>> used.

>> Finally do you know exactly how many iterations it takes for the >> problem
>> to
>> appear, and is it always the same number?

>> --
>> Ginny Caughey
>> Device Application Development MVP



.



Relevant Pages

  • HELP DEBUG: FreeBSD 6.3-RELEASE-p3 TIMEOUT - WRITE_DMA + other strange behaviour!
    ... I have a VERY strange behaving 6-3p3 with DMA tmieouts and network cards ... inet 8.9.10.11 netmask 0xffffffe0 broadcast 8.9.10.255 ... *sometimes* not everytime I'm loosing connection to xl0 or fxp0 ...
    (freebsd-stable)
  • Re: PPC can not reach internet thru PC
    ... I think found a really strange solution to my problem. ... I tried syncing using the cell phone. ... Thinking back I was having problems connecting to a really strange wi-fi access point earlier on the day I discovered I was having problems syncing while docked. ... I've tried changing the WMDC connection proprerty from Automatic to Internet, ...
    (microsoft.public.pocketpc.activesync)
  • Re: Using Cool Edit notch filters
    ... No internet connection, printer etc. ... Does the noise change when the mic is placed at a different location? ... It would be strange if you get the same results. ... I have a new Edirol M-16DX which has 4 mic inputs and USB connection ...
    (rec.audio.pro)
  • Re: More On Meat Eating - Growing Children Need It
    ... I wonder if anyone else has noted the strangely convoluted connection ... If in fact, Richard, this is ... > certain proteins, fatty acids, trace minerals etc from other animals ... > What's so strange about Kenyan children getting cleverer on meat then? ...
    (sci.anthropology.paleo)
  • Re: Strange session timeout problem(urgent help needed).
    ... That's not strange at all, if the maximum session ... >> Try setting timeout to 1 and refresh to 2. ... >> Ven, y hablemos de ASP.NET... ...
    (microsoft.public.dotnet.framework.aspnet)

Loading