[p4] p4com and long-running tasks
Andreas.Axelsson at dice.se
Tue Oct 4 23:08:05 PDT 2005
It looks like recreating the p4com::p4 object whenever there's a failure
solved the problem, or at least it hasn't failed in quite a while now.
I'll report back with further findings.
> -----Original Message-----
> From: Robert Cowham [mailto:robert at vaccaperna.co.uk]
> Sent: den 3 oktober 2005 10:59
> To: Andreas Axelsson
> Cc: perforce-user at perforce.com
> Subject: RE: [p4] p4com and long-running tasks
> See below.
> > I first assumed it was failing because the perforce server
> was being
> > offline running backups at night, but that doesn't seem to be the
> > case.
> > Running against non-existing servers, or a local service
> that's turned
> > off produces another error message. Checking the server
> logs indicates
> > that backup is running on-line and not on the times that the tool
> > fails.
> > Some details:
> > The tool uses p4com to regularly query for changes on certain files.
> > Sometimes, usually during the night, it fails with:
> > The server threw an exception. (Exception from HRESULT: 0x80010105
> > (RPC_E_SERVERFAULT)) at P4COM.p4Class.run(String cmd)
> > The odd thing is that it never recovers after that error.
> No matter if
> > the server is available or not. It continues to report the
> same error
> > until the tool is restarted.
> There is some tracing you can turn on to see what is
> happening within p4com:
> Set following key to 1
> HKEY_CURRENT_USER\Software\Perforce\P4OFC, DebugTrace
> And download dbgview from sysinternals.com website and run it
> on your machine. See what happens.
> Also, if you are querying from time to time, then you might
> want to create a new p4com::p4 class instance for every query
> to see if that makes a difference.
> > If I run against a local server, which is turned on and
> off, I get the
> > following error:
> > (0x80020009): Connect to server failed; check $P4PORT. TCP
> connect to
> > aax-1:1666 failed. connect: aax-1:1666: WSAECONNREFUSED Turning the
> > server on again restores the functionality.
> Well this is by design unless I am misunderstanding something
> here?! You would get the same error message from the command
> line or p4win etc.
> > Btw, I tried creating new instances of the p4com::p4 class
> whenever a
> > failure showed up. So far it has resulted in a silent
> shutdown of the
> > tool. Further investigation pending...
> It would be useful to know what's going on in this case.
More information about the perforce-user