Discussion:
[p4] p4 monitor terminate never seems to work
Michael Mirman
2017-10-16 20:28:31 UTC
Permalink
I also find that on our Commit server we typically have around 100 pid's
active (ps ax | grep p4d), though 'p4 monitor show' usually only shows
about 10-15 processes, what I'd expect.
I can't explain this with Ctl-C. Presumably, the p4d process *should* go away (at least eventually) if the client does Ctl-C.
The p4d log often says "Partner exited unexpectedly", and at least in some cases it could be traced back to Ctrl-C.

However, there are often cases when p4d leaks processes. Sometimes they are shown in "p4 monitor", sometimes they aren't.
In our case, there is almost always an edge server and a broker in the chain, and that possibly plays an important role in leaking.

We have a script, which runs as a cron job, looking for leaked and/or hung processes, and either kills them or it can report them for an investigation.
Our latest bane is leaking "login" processes ("p4 login -s", "p4 login", "p4 login -a").
Users never complain - this is purely the problem on the server side. We get about a dozen of those processes on a good day, and several dozen processes on a bad day.
I long ago accepted this as a fact of life.
:-(
--
Michael Mirman
MathWorks, Inc.
3 Apple Hill Drive, Natick, MA 01760
508-647-7555
-----Original Message-----
Of Matt Janulewicz
Sent: Monday, October 16, 2017 2:55 PM
Subject: Re: [p4] p4 monitor terminate never seems to work
Posted on behalf of forum user 'Matt Janulewicz'.
[https://forums.perforce.com/index.php?app=forums&module=forums&sectio
n=findpost&pid=22495]
FWIW: We don't have to run terminate too often, but I find that at least half
the time, I end up having to kill the process on the server. I don't have any data
on which commands cause this. I've seen this since I started working with
Perforce, including 2013.x, 2015.x or 2016.x, and 2017.1 .
I find that I have to do a proper 'kill' 100% of the time. My usual
process is 'p4 monitor terminate pid', 'p4 monitor clear pid',
'kill pid'.
I also find that on our Commit server we typically have around 100 pid's
active (ps ax | grep p4d), though 'p4 monitor show' usually only shows
about 10-15 processes, what I'd expect. I think perhaps when people
'ctl+c' on a process it doesn't get killed on the server. I long ago
accepted this as a fact of life.
--
http://forums.perforce.com/index.php?/topic/3581-p4-monitor-terminate-
never-seems-to-work
_______________________________________________
http://maillist.perforce.com/mailman/listinfo/perforce-user
_______________________________________________
perforce-user mailing list - perforce-***@perforce.com
http://maillist.per
Michael Mirman
2017-10-16 20:43:48 UTC
Permalink
... we have that enabled on our server already...
We turned it on in February, and removed it a month later because it was causing p4d segfaults in certain cases (like "p4 admin stop").
It was fixed later in 2016.2, and we set it again about a month ago.
I am pretty sure "p4 monitor terminate" does not always terminate the server process, but whether those processes would actually go away on their own after 30 minutes(?) or not, I can't say. I'm not that patient, and "kill -15" works every time.
--
Michael Mirman
MathWorks, Inc.
3 Apple Hill Drive, Natick, MA 01760
508-647-7555
-----Original Message-----
Of BrianH
Sent: Monday, October 16, 2017 4:30 PM
Subject: Re: [p4] p4 monitor terminate never seems to work
Posted on behalf of forum user 'BrianH'.
[https://forums.perforce.com/index.php?app=forums&module=forums&sectio
n=findpost&pid=22496]
We now have a solution for this.  Run
p4 configure set db.monitor.interval=30
Then the next time a process is hung, you can safely run
p4 monitor terminate pid
See http://answers.perforce.com/articles/KB/3785
The super cool thing is that we have that enabled on our server already and
have
recently rebooted so I know it should have picked it up. Terminate still does
nothing.
--
http://forums.perforce.com/index.php?/topic/3581-p4-monitor-terminate-
never-seems-to-work
_______________________________________________
http://maillist.perforce.com/mailman/listinfo/perforce-user
_______________________________________________
perforce-user mailing list - perforce-***@perforce.com
http://maillist.perforce.com/m
Loading...