process failed to quit after polite request

Posted on
Wed Mar 21, 2018 1:56 pm
FlyingDiver offline
User avatar
Posts: 7220
Joined: Jun 07, 2014
Location: Southwest Florida, USA

process failed to quit after polite request

Full message:
Code: Select all
   Error                           process (pid XXX) failed to quit after polite request -- forcing it to quit now


I get this intermittently with the Lutron plugin, and I'm trying to figure out why. Any insight on where to start looking? Does the timer start after all the devices are shut down? My Lutron system, if fully mapped to Indigo, creates over 500 Indigo devices. That's a lot of devices to run devStopComm() on. Or does it start when the shutdown flag is set for runConcurrentThread()?

joe (aka FlyingDiver)
my plugins: http://forums.indigodomo.com/viewforum.php?f=177

Posted on
Wed Mar 21, 2018 1:58 pm
Colorado4Wheeler offline
User avatar
Posts: 2794
Joined: Jul 20, 2009
Location: Colorado

Re: process failed to quit after polite request

My solution to stop them all is to blind stop them or stop them in a thread. I had the same issue with HKB trying to shut down the various servers, it exceeds the allotted time frame. Blind stopping ensured that I did that without risking that Indigo would kill the process before the servers were told to stop and leave them running if the plugin wasn't.

My Modest Contributions to Indigo:

HomeKit Bridge | Device Extensions | Security Manager | LCD Creator | Room-O-Matic | Smart Dimmer | Scene Toggle | Powermiser | Homebridge Buddy

Check Them Out Here

Posted on
Wed Mar 21, 2018 2:28 pm
FlyingDiver offline
User avatar
Posts: 7220
Joined: Jun 07, 2014
Location: Southwest Florida, USA

Re: process failed to quit after polite request

What do you mean by "blind stop"?

joe (aka FlyingDiver)
my plugins: http://forums.indigodomo.com/viewforum.php?f=177

Posted on
Wed Mar 21, 2018 2:33 pm
jay (support) offline
Site Admin
User avatar
Posts: 18220
Joined: Mar 19, 2008
Location: Austin, Texas

Re: process failed to quit after polite request

FlyingDiver wrote:
Full message:
Code: Select all
   Error                           process (pid XXX) failed to quit after polite request -- forcing it to quit now


I get this intermittently with the Lutron plugin, and I'm trying to figure out why. Any insight on where to start looking? Does the timer start after all the devices are shut down? My Lutron system, if fully mapped to Indigo, creates over 500 Indigo devices. That's a lot of devices to run devStopComm() on. Or does it start when the shutdown flag is set for runConcurrentThread()?


The most common cause of this is network timeouts. If your plugin is waiting for some incoming data or a reply and is down in the Python networking code, it may not come back in the right amount of time (default Python network timeouts are usually 30 seconds or more). Setting relatively short timeouts to any network calls often solves the problem.

It could also happen if you have a tight loop in the runConcurrentThread method that doesn't call the sleep() method.

Jay (Indigo Support)
Twitter | Facebook | LinkedIn

Posted on
Wed Mar 21, 2018 2:43 pm
FlyingDiver offline
User avatar
Posts: 7220
Joined: Jun 07, 2014
Location: Southwest Florida, USA

Re: process failed to quit after polite request

Thanks for reminding me to look at the network timeout. I think I found the issue. All I can say is that I didn't write that particular piece of code. ;)

joe (aka FlyingDiver)
my plugins: http://forums.indigodomo.com/viewforum.php?f=177

Posted on
Wed Mar 21, 2018 3:09 pm
jay (support) offline
Site Admin
User avatar
Posts: 18220
Joined: Mar 19, 2008
Location: Austin, Texas

Re: process failed to quit after polite request

FlyingDiver wrote:
Thanks for reminding me to look at the network timeout. I think I found the issue. All I can say is that I didn't write that particular piece of code. ;)


:wink: - I still sometimes forget to set it (and it was less than intuitive in Python 2.5 and pre-requests).

Jay (Indigo Support)
Twitter | Facebook | LinkedIn

Posted on
Wed Mar 21, 2018 3:18 pm
FlyingDiver offline
User avatar
Posts: 7220
Joined: Jun 07, 2014
Location: Southwest Florida, USA

Re: process failed to quit after polite request

jay (support) wrote:
FlyingDiver wrote:
Thanks for reminding me to look at the network timeout. I think I found the issue. All I can say is that I didn't write that particular piece of code. ;)


:wink: - I still sometimes forget to set it (and it was less than intuitive in Python 2.5 and pre-requests).


In this case, whoever originally wrote the Caséta code (I don't think it was Jim), set the timeout to 35 sec because the login process to that device was taking a long time. But it was never reset to something more reasonable.

joe (aka FlyingDiver)
my plugins: http://forums.indigodomo.com/viewforum.php?f=177

Page 1 of 1

Who is online

Users browsing this forum: No registered users and 6 guests