473,387 Members | 1,493 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,387 software developers and data experts.

Regualr Expressions Timing out

Tom
I have a regular expression that replaces a 2,103,518 file with the following
but I'm getting a TimeOut in .NET! Can anyone assist? My server is running
Windows Server 2000 with all the latest service packs. My server has 1 gig
of RAM!

Here is my HTTP error code
Exception Type: System.Web.HttpException
ErrorCode: -2147467259
Message: Request timed out.
TargetSite: NULL
HelpLink: NULL
Source: NULL
And here is the Regular Expression on the 2 meg file.

Regex oBlanksBeforesStart = new Regex("\\s*\\n\\" +
sStart,RegexOptions.IgnoreCase & RegexOptions.Compiled);

strOutput = oBlanksBeforesStart.Replace(strOutput,"\n"+tsStart Upper);
Any advice greatly appraciated.

Tom
Nov 16 '05 #1
2 2403
Tom,

It's not the regular expression that times out, but rather, the ASP.NET
process that is timing out. I would suggest setting the response timeout to
something a little longer to handle what you are trying to do. Generally
speaking, it's not a good idea to perform long-running operations like this,
as you can't really inform the user as to what is going on.

Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"Tom" <To*@discussions.microsoft.com> wrote in message
news:63**********************************@microsof t.com...
I have a regular expression that replaces a 2,103,518 file with the
following
but I'm getting a TimeOut in .NET! Can anyone assist? My server is
running
Windows Server 2000 with all the latest service packs. My server has 1
gig
of RAM!

Here is my HTTP error code
Exception Type: System.Web.HttpException
ErrorCode: -2147467259
Message: Request timed out.
TargetSite: NULL
HelpLink: NULL
Source: NULL
And here is the Regular Expression on the 2 meg file.

Regex oBlanksBeforesStart = new Regex("\\s*\\n\\" +
sStart,RegexOptions.IgnoreCase & RegexOptions.Compiled);

strOutput = oBlanksBeforesStart.Replace(strOutput,"\n"+tsStart Upper);
Any advice greatly appraciated.

Tom

Nov 16 '05 #2
Tom
Dear Nicholas Paldino

Thanks for taking my issue.
But where exactly do you suggest I set the response timeout to a longer value?

Cna you give me an example?

Thanks

Tom
"Nicholas Paldino [.NET/C# MVP]" wrote:
Tom,

It's not the regular expression that times out, but rather, the ASP.NET
process that is timing out. I would suggest setting the response timeout to
something a little longer to handle what you are trying to do. Generally
speaking, it's not a good idea to perform long-running operations like this,
as you can't really inform the user as to what is going on.

Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"Tom" <To*@discussions.microsoft.com> wrote in message
news:63**********************************@microsof t.com...
I have a regular expression that replaces a 2,103,518 file with the
following
but I'm getting a TimeOut in .NET! Can anyone assist? My server is
running
Windows Server 2000 with all the latest service packs. My server has 1
gig
of RAM!

Here is my HTTP error code
Exception Type: System.Web.HttpException
ErrorCode: -2147467259
Message: Request timed out.
TargetSite: NULL
HelpLink: NULL
Source: NULL
And here is the Regular Expression on the 2 meg file.

Regex oBlanksBeforesStart = new Regex("\\s*\\n\\" +
sStart,RegexOptions.IgnoreCase & RegexOptions.Compiled);

strOutput = oBlanksBeforesStart.Replace(strOutput,"\n"+tsStart Upper);
Any advice greatly appraciated.

Tom


Nov 16 '05 #3

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

Similar topics

10
by: John Machin | last post by:
Please consider the timings below, where a generator expression starts out slower than the equivalent list comprehension, and gets worse: >python -m timeit -s "orig=range(100000)"...
1
by: jj | last post by:
I've got one database server that works fine when transferring large amounts of data, but a new one that has been setup seems to want to timeout or drop the connection after a period of time. I've...
10
by: Greg Stark | last post by:
This query is odd, it seems to be taking over a second according to my log_duration logs and according to psql's \timing numbers. However explain analyze says it's running in about a third of a...
7
by: jamie | last post by:
hey all, I am attempting to do motion control for a final project, but I have a concern.... For motion control, timing is everyting, the better it is, the better it works. Currently I am...
1
by: Novice | last post by:
Hi all, I'm at my wit's end on trying to insert some timing code into the server side code that parses the hashed data contained in the hidden field being submitted to the server I've tried...
3
by: gregory_may | last post by:
I have an application where I am using a System Thread to capture the screen & Broadcast it to clients. Its "working", but the timing on the background thread gets wildly erratic at times. Some...
13
by: Daniel W | last post by:
Hi! I tried to post this to comp.lang.c.moderated but it didn't seem to go through. I've got a question about volatiles in assignment expressions. I found the following code snippet in an...
66
by: Atmapuri | last post by:
Hi! I noticed a very funny behaviour when overloading operators on objects in C#: MyOjbects a,b,c,d; .... //objects are created and initalized here... .... b.Length = 100;
2
by: Steven D'Aprano | last post by:
The timeit module is ideal for measuring small code snippets; I want to measure large function objects. Because the timeit module takes the code snippet argument as a string, it is quite handy...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
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
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

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.