Getting OutOfMemory error in 3.5 Windows app after upgrading server memory
-
We have a windows 2003 - Enterprise server (32bit os) that previously had 12GB memory. We've upgraded it to 32GB, and now our .net 3.5 Windows application is getting an out of memory error when we run it. (Don't think it matters, but we're hitting Oracle 10g, SQL Server 2000, and MySql 5 databases). Nothing in the program has been changed, only the server memory. Any thoughts? I've been googling for 3 hours and have nothing. The memoryLimit in machine.config seems only to apply to ASP.Net apps.
-
We have a windows 2003 - Enterprise server (32bit os) that previously had 12GB memory. We've upgraded it to 32GB, and now our .net 3.5 Windows application is getting an out of memory error when we run it. (Don't think it matters, but we're hitting Oracle 10g, SQL Server 2000, and MySql 5 databases). Nothing in the program has been changed, only the server memory. Any thoughts? I've been googling for 3 hours and have nothing. The memoryLimit in machine.config seems only to apply to ASP.Net apps.
-
Paul Brower wrote:
Any thoughts?
Not much help I'm afraid, but MSDN[^] states that there's a 16Gb limit for the 32bit version of W2k3 Enterprise, and that you'd need some special configuration[^] to use it fully up to the 32Gb limit.
I are Troll :suss:
Well, we've got 32GB in there, with no other problems. The error only occurs when we're hitting the MySql database.
-
Well, we've got 32GB in there, with no other problems. The error only occurs when we're hitting the MySql database.
Paul Brower wrote:
The error only occurs when we're hitting the MySql database.
Paul Brower wrote:
our .net 3.5 Windows application is getting an out of memory error when we run it.
Thus it's limited to MySQL and .NET; are you using MySql Connector/NET[^], or another provider? Is it replicatable in a small test-project?
I are Troll :suss:
-
Paul Brower wrote:
The error only occurs when we're hitting the MySql database.
Paul Brower wrote:
our .net 3.5 Windows application is getting an out of memory error when we run it.
Thus it's limited to MySQL and .NET; are you using MySql Connector/NET[^], or another provider? Is it replicatable in a small test-project?
I are Troll :suss:
Yes, I'm using version 6.2 (latest) of MySql connector for .net. My problem here, is that it is only a problem on our server that now has 32GB memory (upgraded last night from 12GB). I can't duplicate the problem in a dev environment ... only prod. I'm not about to install visual studio on that server either. It HAS to been a bug in .Net 2.0 or 3.5, or a bug in MySql 6.2 -- only an issue if you have 32GB memory? I don't know.
-
Yes, I'm using version 6.2 (latest) of MySql connector for .net. My problem here, is that it is only a problem on our server that now has 32GB memory (upgraded last night from 12GB). I can't duplicate the problem in a dev environment ... only prod. I'm not about to install visual studio on that server either. It HAS to been a bug in .Net 2.0 or 3.5, or a bug in MySql 6.2 -- only an issue if you have 32GB memory? I don't know.
Paul Brower wrote:
I can't duplicate the problem in a dev environment ... only prod. I'm not about to install visual studio on that server either. It HAS to been a bug in .Net 2.0 or 3.5, or a bug in MySql 6.2 -- only an issue if you have 32GB memory? I don't know.
Let's find out; if you create a small console-application (on the dev pc), targetting .NET 2.0, using ODBC, can you query the database (when running on the prod pc?)
I are Troll :suss:
-
Paul Brower wrote:
I can't duplicate the problem in a dev environment ... only prod. I'm not about to install visual studio on that server either. It HAS to been a bug in .Net 2.0 or 3.5, or a bug in MySql 6.2 -- only an issue if you have 32GB memory? I don't know.
Let's find out; if you create a small console-application (on the dev pc), targetting .NET 2.0, using ODBC, can you query the database (when running on the prod pc?)
I are Troll :suss:
SOOOO embarrassed about this, but I feel like I must post, so as not to further dissuade anyone from using MySql. As it turns out, the code the was executing in production, somehow (um, me) was double-building an inner join. So, instead of something like this: select s.id, s.tag, s.gline, s.sex, bdCal.yyyymmdd as birth_date from weaner_83 s inner join calendar bdCal on bdCal.dddd=s.birthdate where id in ('X05008869E1G7','X05028869E1G7') I was getting this: select s.id, s.tag, s.gline, s.sex, bdCal.yyyymmdd as birth_date from weaner_83 s inner join calendar inner join calendar bdCal on bdCal.dddd=s.birthdate where id in ('X05008869E1G7','X05028869E1G7') These ids can only exist once in the table. With these two Id's, i was getting 380,000 records. Why, you ask? about 190,000 records in the table, and 10,000 in the calendar table. Of course my actual code was query much more than just these two id's. I'll probably never know how this happened, but most assuredly it's my fault. Now it's fixed, and i've burned a good 8 hours. Thanks for you willingness to help.
-
SOOOO embarrassed about this, but I feel like I must post, so as not to further dissuade anyone from using MySql. As it turns out, the code the was executing in production, somehow (um, me) was double-building an inner join. So, instead of something like this: select s.id, s.tag, s.gline, s.sex, bdCal.yyyymmdd as birth_date from weaner_83 s inner join calendar bdCal on bdCal.dddd=s.birthdate where id in ('X05008869E1G7','X05028869E1G7') I was getting this: select s.id, s.tag, s.gline, s.sex, bdCal.yyyymmdd as birth_date from weaner_83 s inner join calendar inner join calendar bdCal on bdCal.dddd=s.birthdate where id in ('X05008869E1G7','X05028869E1G7') These ids can only exist once in the table. With these two Id's, i was getting 380,000 records. Why, you ask? about 190,000 records in the table, and 10,000 in the calendar table. Of course my actual code was query much more than just these two id's. I'll probably never know how this happened, but most assuredly it's my fault. Now it's fixed, and i've burned a good 8 hours. Thanks for you willingness to help.