RPC limit - Child Processes

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I read somewhere that I need to launch child processes to overcome my
problems with the RPC limit. Please can anyone explain what that means and
how to do it?

Thanks in advance

Vaughan
 
There is really not much to explain: say, you want to process 500 messages
simultaneously. Lauch an executable that processes items 1-250 and lauch
either thee same or a different exe that processes items 251-500.
I strongly suspect that you need to redesign your architecture if you need
to open that many RPC channels simultaneously.

Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool
 
=?Utf-8?B?VmF1Z2hhbg==?= said:
I read somewhere that I need to launch child processes to overcome my
problems with the RPC limit. Please can anyone explain what that means
and how to do it?

A given process has a limit of 255 (maybe as low as 240 in practise)
RPC connections at once, so if you want to make more connections than
that, you need to launch a second process. Each outlook object may keep
an rpc connection open, so once you have too many objects floating
around, your process can run out of connections.

This may not be relevant to you if you're just writing OOM macros, in
that situation you don't really have the sort of control over things to
launch processes. (well, maybe you do, but it would be no end of pain to
get them talking back to your macro, I suspect).

If you don't know what RPC and/or processes are, you should probably
steer clear of trying to work around restrictions in them. See
http://en.wikipedia.org/wiki/RPC
and
http://en.wikipedia.org/wiki/Process#Computing
for brief definitions; Microsoft's particular take is at

http://msdn.microsoft.com/library/default.asp?url=/library/en-
us/dnanchor/html/rpcank.asp

and

http://msdn.microsoft.com/library/default.asp?url=/library/en-
us/dllproc/base/child_processes.asp

-- dan
 
Dear Dmitry

I'm really more than happy to process my 700 odd items one after the other,
but nothing I have tried will process more than 249 of them before generating
an error. I have rewritten the procedure something like twenty times,
inserted intermediate variables, removed them again, changed from "for each"
to "do while" loops and back again, shipped the processing out to subroutines
and written them back into the main sub again. Every time, just 249 items
processed.

All I want to do is copy the items in a folder to an Access table for
reporting. If my architecture is inappropriate, I would be delighted to
change it. Can you give me any advice at all on how to do that?

Thanks

Vaughan
 
Did you try to use a "for" loop instead of "while" and set each message to
Nothing explicitly inside the loop?

Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool
 
Back
Top