Re: Connection hanging after using(....) construct
- From: "Ginny Caughey [MVP]" <ginny.caughey.online@xxxxxxxxxxxxxx>
- Date: Wed, 5 Sep 2007 07:45:47 -0400
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
.
- Follow-Ups:
- Re: Connection hanging after using(....) construct
- From: d . wiss
- Re: Connection hanging after using(....) construct
- References:
- Re: Connection hanging after using(....) construct
- From: d . wiss
- Re: Connection hanging after using(....) construct
- Prev by Date: Re: Connection hanging after using(....) construct
- Next by Date: Re: Connection hanging after using(....) construct
- Previous by thread: Re: Connection hanging after using(....) construct
- Next by thread: Re: Connection hanging after using(....) construct
- Index(es):
Relevant Pages
|
Loading