Using VS2008, C#, ASP.Net 2 with AspNetMySqlMembershipProvider / AspNetMySqlRoleProvider / AspNetMySqlProfileProvider / CoreLab.Data 4.50.21 and CoreLab.MySql(.Web) 4.50.25.
The web.config is copy/paste from the examples.
Every 20-25 pageviews I get a
"Lost connection to MySQL server during query" - Server Error
Where the source points to the row with:
MembershipUser user = Membership.GetUser();
I have to use a shared MySQL 5 server and have no influence whatsoever on the configuration (My ISP says it works for thousends of sites without problems, so the problem is on your site).
In my testserver/environment it works without problem I can do hunderds requests a minute without any problem.
Is there something I can configure on 'my' site so the providers start working as they should or can I better use MsSQL Express for the provider part and for the other databasestuff MySQL. I can program around lost connections in my normal pages, but don't know if I or how I can do that for the provider part.
Any help/suggestions are welcome!
Lost connection to MySQL server during query - 2
-
- Posts: 3
- Joined: Sun 15 Apr 2007 05:56
-
- Posts: 729
- Joined: Thu 13 Dec 2007 10:24
-
- Posts: 3
- Joined: Sun 15 Apr 2007 05:56
The code
MembershipUser user = Membership.GetUser();
I don't know exactly where I can manage the settings used by the providers.
In the web.config the following connectionstring is used for the providers:
On my pages I have many queries against the database using the same connectionstring and the connections are never lost, only sometimes when the membership or role provider uses the connection to the database.
BTW: in my testenviroment I'm never able to get those connection Lost errors, but I guess that MySQL-server is configured better then my ISP's or less busy.
I don't know exactly where I can manage the settings used by the providers.
In the web.config the following connectionstring is used for the providers:
On my pages I have many queries against the database using the same connectionstring and the connections are never lost, only sometimes when the membership or role provider uses the connection to the database.
BTW: in my testenviroment I'm never able to get those connection Lost errors, but I guess that MySQL-server is configured better then my ISP's or less busy.
-
- Posts: 729
- Joined: Thu 13 Dec 2007 10:24
Check that you have explicitly called all MyDataReader.Close();
Do you use multithreading?
Do you connect in Direct mode?
Probably (and it's likely the source of the problem),
the same connection is used by several controls at the same time.
Try using different connections for data loading and memberships/roles.
Do you use multithreading?
Do you connect in Direct mode?
Probably (and it's likely the source of the problem),
the same connection is used by several controls at the same time.
Try using different connections for data loading and memberships/roles.