Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Connection problems
Message
De
19/02/2011 11:38:15
 
 
À
19/02/2011 03:43:19
Information générale
Forum:
ASP.NET
Catégorie:
Autre
Divers
Thread ID:
01500677
Message ID:
01500862
Vues:
35
Hi Nick,

>However I don't think thats my problem as I did check on the Mysql management console for open threads. Then I restarted Mysql and fired off my stored procedure from the web site. It opened two thread for the stored procedure and promptly one thread was marked as sleep till it timed out. I'm not sure why the Stored procedure opens two threads. I'll have to dig into it more on Monday.

1) Are you using OleDb classes or the Sql classes? What about the database provider? I think MySql has its own, but I'm not 100% sure.

2) Are you by any chance using the CommandBuilder.DeriveParameters()? This makes an extra trip to the database to figure out your Stored Procs parameters. This might account for the two threads you're seeing (just a guess, I don't know that for sure either).

~~Bonnie





>>>HI
>>>
>>>I'm using a mysql database to do some reporting.
>>>
>>>I seem to be having a problem with my data connection intermittently hanging up or freezing.
>>>
>>
>>Are you opening and closing the connection between calls? Or are you trying to hold the same connection while the site is active? The normal way is to open/close them (which isn't as awful as it sounds - it just returns the connection to the pool). If you're attempting to hold the connection (in something like a static property) then it's possible the server is just disconnecting an inactive connection after a while.
>
>Hi Paul
>
>its not my data layer :-) .But it does seem to leave connections open.
>
>However I don't think thats my problem as I did check on the Mysql management console for open threads. Then I restarted Mysql and fired off my stored procedure from the web site. It opened two thread for the stored procedure and promptly one thread was marked as sleep till it timed out. I'm not sure why the Stored procedure opens two threads. I'll have to dig into it more on Monday.
>
>It does seem to be problem relating to my stored procedures and not SQL statements as a few are sent before the stored procedure call and they consistently work ok. But also I can run the stored procedures from the Mysql query browser and they work ok. (this is at the same time as the thread from the web site is frozen).
>
>Also this is intermittent and I haven't been able to figure out what is causing that yet. If it consistently didn't work it would be a lot easier (how often have we heard that before)
>
>Nick
Bonnie Berent DeWitt
NET/C# MVP since 2003

http://geek-goddess-bonnie.blogspot.com
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform