472,952 Members | 2,165 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

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

Process.start() within Backgroundworker - Memory limit??

Hi Newsgroup,

I am developing a C# Windows Forms application that launches processes within
a background worker..

The processes seem to have a memory limit of about 278mb. Some proccesses
that get to that
amount of used memory seem to hang ;-(

Is there a memory limit that can be adjusted ?? The physical machine has 3
GB RAM, should be enough...

Thanks
Sven
Jul 15 '08 #1
4 6290
Sven W. wrote:
I am developing a C# Windows Forms application that launches processes within
a background worker..

The processes seem to have a memory limit of about 278mb. Some proccesses
that get to that
amount of used memory seem to hang ;-(
I'm quite skeptical that BackgroundWorker has anything to do with it. Can
you verify that the problem doesn't occur if you start them without using
BackgroundWorker, or even if you start them manually?

--
J.
Jul 15 '08 #2
Hi Jeroen,

let me 1st tell you something about the application:

- windows forms application that should act quite like a batchfile ->
launching programs out of a list,
- displays list of programs in a datagridview,
- Button_Click() - backgroundworker.RunAsync()
- backgroundworker.DoWork() - launches item per item the programs from the
list as a process.

now, I removed the bgworker.. still the same problem.

One console program consumes about 280mb within the started process and
hangs. when launching it from normal console start>execute program .... it
consumes about 400mb and exists normally.

I think the problem is the "process class" of c#. Is it possible to adjust
its maximum memorylimit, if it has a memory limit...

Any hints ?

Sven
"Jeroen Mostert" wrote:
Sven W. wrote:
I am developing a C# Windows Forms application that launches processes within
a background worker..

The processes seem to have a memory limit of about 278mb. Some proccesses
that get to that
amount of used memory seem to hang ;-(
I'm quite skeptical that BackgroundWorker has anything to do with it. Can
you verify that the problem doesn't occur if you start them without using
BackgroundWorker, or even if you start them manually?

--
J.
Jul 16 '08 #3
On Wed, 16 Jul 2008 06:21:02 -0700, Sven W.
<Sv***@discussions.microsoft.comwrote:
[...]
now, I removed the bgworker.. still the same problem.
As Jeroen accurately speculated. :)
One console program consumes about 280mb within the started process and
hangs. when launching it from normal console start>execute program ....it
consumes about 400mb and exists normally.

I think the problem is the "process class" of c#. Is it possible to
adjust
its maximum memorylimit, if it has a memory limit...
It doesn't, and your problem is unlikely to be specific to the Process
class.

If the processes being launched are hanging, you need to debug that. That
is, debug a hung process, not the application starting the process.
Especially since the memory consumptions you're describing are so far
below any usual limitation on a modern PC, I really doubt that you've got
a memory consumption/limit problem. There's something else going on.

Pete
Jul 16 '08 #4
There is a client heap setting you can adjust for windows applications
although it applies mainly to COM+. Have a look at this article:
http://support.microsoft.com/kb/556076

--

Regards,
Alvin Bruney [MVP ASP.NET]

[Shameless Author plug]
Download OWC Black Book, 2nd Edition
Exclusively on www.lulu.com/owc $15.00
Need a free copy of VSTS 2008 w/ MSDN Premium?
http://msmvps.com/blogs/alvin/Default.aspx
-------------------------------------------------------
"Sven W." <Sv***@discussions.microsoft.comwrote in message
news:76**********************************@microsof t.com...
Hi Jeroen,

let me 1st tell you something about the application:

- windows forms application that should act quite like a batchfile ->
launching programs out of a list,
- displays list of programs in a datagridview,
- Button_Click() - backgroundworker.RunAsync()
- backgroundworker.DoWork() - launches item per item the programs from the
list as a process.

now, I removed the bgworker.. still the same problem.

One console program consumes about 280mb within the started process and
hangs. when launching it from normal console start>execute program .... it
consumes about 400mb and exists normally.

I think the problem is the "process class" of c#. Is it possible to adjust
its maximum memorylimit, if it has a memory limit...

Any hints ?

Sven
"Jeroen Mostert" wrote:
>Sven W. wrote:
I am developing a C# Windows Forms application that launches processes
within
a background worker..

The processes seem to have a memory limit of about 278mb. Some
proccesses
that get to that
amount of used memory seem to hang ;-(
I'm quite skeptical that BackgroundWorker has anything to do with it. Can
you verify that the problem doesn't occur if you start them without using
BackgroundWorker, or even if you start them manually?

--
J.
Aug 2 '08 #5

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

Similar topics

77
by: Charles Law | last post by:
Hi guys I have a time critical process, running on a worker thread. By "time critical", I mean that certain parts of the process must be completed in a specific time frame. The time when the...
22
by: Zen | last post by:
Hi, My production machine has 2G of memory, when aspnet_wp.exe goes up to about ~1.2G of memory usage, I start get out-of-memory exception. Other processes don't use as much memory and I added...
28
by: Jon Davis | last post by:
We're looking at running a memory-intensive process for a web site as a Windows service in isolation of IIS because IIS refuses to consume all of the available physical RAM. Considering remoting to...
4
by: Diego F. | last post by:
Hello. I have a process that can take a long time and I'm trying to put an animated gif while the user is waiting. I added a panel with a picturebox with the image inside. The panel is not...
8
by: Nehil | last post by:
When a process is started three segments are created : 1) Text. 2) Stack. 3) Data. The size of First two is fixed and their upperlimit is fixed by the compiler. (Plz correct if i'm wrong) Now...
4
by: Daniel | last post by:
is there some per-process-limit on memory in .net processes? is there any way to increase it? i keep getting System.OutOfMemoryException when my box has 8 gigs of unused memory.
5
by: Max2006 | last post by:
Hi, What is the limit for memory that a .NET process or AppDomain can use? Thank you, Max
32
by: John Wright | last post by:
I have a long process I run that needs to be complete before the user can continue. I can change the cursor to an hourglass, but I want to update the Status Strip on the bottom during the process. ...
1
rauty
by: rauty | last post by:
Hi all, I have a situation where I'm using BackgroundWorker to run a long process in the background. However, whenever it runs I keep getting the following error: "TargetInvocationException was...
0
by: lllomh | last post by:
Define the method first this.state = { buttonBackgroundColor: 'green', isBlinking: false, // A new status is added to identify whether the button is blinking or not } autoStart=()=>{
2
by: DJRhino | last post by:
Was curious if anyone else was having this same issue or not.... I was just Up/Down graded to windows 11 and now my access combo boxes are not acting right. With win 10 I could start typing...
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 4 Oct 2023 starting at 18:00 UK time (6PM UTC+1) and finishing at about 19:15 (7.15PM) The start time is equivalent to 19:00 (7PM) in Central...
2
by: giovanniandrean | last post by:
The energy model is structured as follows and uses excel sheets to give input data: 1-Utility.py contains all the functions needed to calculate the variables and other minor things (mentions...
3
NeoPa
by: NeoPa | last post by:
Introduction For this article I'll be using a very simple database which has Form (clsForm) & Report (clsReport) classes that simply handle making the calling Form invisible until the Form, or all...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 1 Nov 2023 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM) Please note that the UK and Europe revert to winter time on...
3
by: nia12 | last post by:
Hi there, I am very new to Access so apologies if any of this is obvious/not clear. I am creating a data collection tool for health care employees to complete. It consists of a number of...
0
NeoPa
by: NeoPa | last post by:
Introduction For this article I'll be focusing on the Report (clsReport) class. This simply handles making the calling Form invisible until all of the Reports opened by it have been closed, when it...
0
isladogs
by: isladogs | last post by:
The next online meeting of the Access Europe User Group will be on Wednesday 6 Dec 2023 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, Mike...

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.