473,397 Members | 2,116 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,397 software developers and data experts.

Very anoying problem, please help (asp.net, IIS, regex)

Hi all.

I have very uncommon problem. I am running
IIS 6.0 on 2xXEON dual core 3.06 (8 virtual CPUs) with
4 gb of Ecc ram and i get system.outofmemory exception
on asp.net website. Thing is that i have big load on
site (site is a crawler that visits 500k pages daily).
I have optimized the code to take 5-10% of CPU usage
max but there is a problem with regex and memory.
Sometimes regex eats 600mb of memory and then iis
web worker crashes and starts spitting that error
(despite it has at least 1.4 gb more memory free???).
Is there any way to limit regex class memory usage?
I have made workaround in a way to use 5 web workers
instead of one (web garden) it works so far but
consumes too much of cpu (10-15%), while it is still
low i am expecting to raise daily visit by 4 times
so it will be alot then. Any suggestions?

Error i get in event log:

EventType clr20r3, P1 w3wp.exe, P2 6.0.3790.1830, P3 42435be1, P4
mscorlib, P5 2.0.0.0, P6 4333ab80, P7 116e, P8 29, P9
system.outofmemoryexception, P10 NIL.

BTW i have ms windows server ee 2003 and /3gb switch on.
Apr 17 '07 #1
2 4235
On Apr 17, 4:01 pm, Tomislav Fistric <lord.f...@spam.email.htnet.hr>
wrote:
Hi all.

I have very uncommon problem. I am running
IIS 6.0 on 2xXEON dual core 3.06 (8 virtual CPUs) with
4 gb of Ecc ram and i get system.outofmemory exception
on asp.net website. Thing is that i have big load on
site (site is a crawler that visits 500k pages daily).
I have optimized the code to take 5-10% of CPU usage
max but there is a problem with regex and memory.
Sometimes regex eats 600mb of memory and then iis
web worker crashes and starts spitting that error
(despite it has at least 1.4 gb more memory free???).
Is there any way to limit regex class memory usage?
I have made workaround in a way to use 5 web workers
instead of one (web garden) it works so far but
consumes too much of cpu (10-15%), while it is still
low i am expecting to raise daily visit by 4 times
so it will be alot then. Any suggestions?

Error i get in event log:

EventType clr20r3, P1 w3wp.exe, P2 6.0.3790.1830, P3 42435be1, P4
mscorlib, P5 2.0.0.0, P6 4333ab80, P7 116e, P8 29, P9
system.outofmemoryexception, P10 NIL.

BTW i have ms windows server ee 2003 and /3gb switch on.
Have you tried switching back to a 2/2 kernel/user configuration? It's
hard to say for sure but using only 600mb would lead me to believe
that there is a configuration problem with .NET. machine.config may
have an improperly set value. You can also configure the worker
process to recycle more often but that would only mask the problem. If
you think you have a leak in your application, taking a memory dump
around the time your application usually hangs can reveal more
detail. Web gardens are a good option but you're still limited to only
2GB of user mode memory.

Ultimate fix: 64bit processing.

-Nate
http://www.naterice.com

Apr 18 '07 #2
>
Have you tried switching back to a 2/2 kernel/user configuration? It's
hard to say for sure but using only 600mb would lead me to believe
that there is a configuration problem with .NET. machine.config may
have an improperly set value. You can also configure the worker
process to recycle more often but that would only mask the problem. If
you think you have a leak in your application, taking a memory dump
around the time your application usually hangs can reveal more
detail. Web gardens are a good option but you're still limited to only
2GB of user mode memory.

Ultimate fix: 64bit processing.

-Nate
http://www.naterice.com
I think i have found my problem. It seems that IIS can't handle alot
of caching callbacks so it crashes on certain amount.
Apr 19 '07 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: iam247 | last post by:
Hi I am a relative beginner with ASP and weak on syntax for sql statements. Basically I modify something which works. I have tblGroupContact with two fields both long integer - ContactID &...
6
by: Dave | last post by:
I'm struggling with something that should be fairly simple. I just don't know the regext syntax very well, unfortunately. I'd like to parse words out of what is basically a boolean search...
4
by: Ben Dewey | last post by:
Hey, I have only been playing with regular expressions for some time. I am working on some code that parses and object 560 event log. I have created two expressions the first one which works...
4
by: | last post by:
Here is an interesting one. Running asp.net 2.0 beta 2. I have a regular expression used in a regex validator that works on the client side in Firefox but not in IE. Any ideas? IE always reports...
4
by: Krakatioison | last post by:
My problem is simple, but I spent lot of time playing with regex and I am going nuts. I need to automatically (many times per day) extract HEADING and DESCRIPTION from the html code below? ...
5
by: Kijak | last post by:
Hi, Im just starting working with REGEX and got a few problems. Could you tell me how to test if two strings can be found in another. ei: String to test: "This is a great car you got" Look...
1
by: lambertb | last post by:
Hi all, my knowledge on regular expression is average. I have this one in asp.net : ^\d+(\.\d\d?)? To my eyes, it correctly validates any whole number (ex: 1, 100), and any decimal number...
5
by: John Blogger | last post by:
(I don't know if it is the right place. So if I am wrong, please point me the right direction. If this post is read by you masters, I'm honoured. If I am getting a mere response, I'm blessed!) ...
3
by: =?Utf-8?B?TWFya19C?= | last post by:
The following is working for me but I want to include numbers in scientific notation. public double Evaluate( string expr ) { const string Num = @"(\-?\d+\.?\d*|\-?\.\d+)" Regex reMulDiv = new...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.