HP Support Forums
Join in the conversation.
12-14-2010 08:16 AM
Running Snow Leopard 10.6.5, but this has been consistent through the past several minor system updates.
My system.log is filled with this repeating error:
Dec 14 09:35:04 iMac com.apple.launchd.peruser.502 (com.hp.help.tocgenerator): Throttling respawn: Will start in 7 seconds
Dec 14 09:35:11 iMac com.apple.launchd.peruser.501 (com.hp.help.tocgenerator): Throttling respawn: Will start in 3 seconds
Dec 14 09:35:14 iMac com.apple.launchd.peruser.502 (com.hp.help.tocgenerator): Throttling respawn: Will start in 7 seconds
Dec 14 09:35:21 iMac com.apple.launchd.peruser.501 (com.hp.help.tocgenerator): Throttling respawn: Will start in 3 seconds
Removing all HP software made it stop. Reinstalling brings it back. I have searched with Google and on HP support with no success. Anyone?
Solved! Go to Solution.
12-19-2010 08:43 AM
This is because the HP Installer has set up what's called a LaunchAgent in MacOS to generate the table of contents in it's help directory. After looking at it in some depth, it appears to me that this need only be run once after installing, yet the installer registers it as a LaunchAgent that should be running all the time. Since the TOCGenerator program does it's thing and immediately quits, LaunchServices just immediately restarts it. After so many cycles of this, LaunchServices throttles it to some number of seconds between invocations and writes a message to the syslog. The message is "harmless" but does indicate that your computer is running this program needlessly over and over and over.
You should be able to stop the LaunchAgent by running the following command from the terminal:
launchctl unload /Library/LaunchAgents/com.hp.help.tocgenerator.pli
At this point, it will stop trying to respawn, but next time you reboot, it will come back; The easiest way to get rid of it permanently (after stopping it with the above command) would be to delete the plist file with the following command:
sudo rm -f /Library/LaunchAgents/com.hp.help.tocgenerator.
That will prompt you for your administrator password, since the file is a system file.
If you're not comfortable using Terminal, you can use the Finder to navigate to /Library/LaunchAgents and drag the file named com.hp.help.tocgenerator.plist to the Trash, and reboot.
As one might expect, by doing this you're mucking around with what HP installed, and you do so at your own risk, but this approach worked fine for me with no outward ill effects.
Hope that helps,
11-09-2011 10:01 PM
There is a better solution, actually. Assuming that HP has a good reason for regenerating the TOC of its Help files, they neglected to add a key that would cause launchd to run the job only once and quit. You have to specify this, because launchd normally wants to keep things alive & will respawn them if they die. You can, however, use the following to alter that default behavior.
So long as we're all comfy with the terminal (and hopefully vi), try this to fix the file in question:
macuser$ launchctl unload /Library/LaunchAgents/com.hp.help.tocgenerator.pli
This unloads the .plist from the running system.
macuser$ sudo vi /Library/LaunchAgents/com.hp.help.tocgenerator.pli
You'll need to use sudo to gain access to the file and be able to save the changes.
The file will look like below, but without the 2 lines of bold text towards the end.
Add the <key>LaunchOnlyOnce</key> and the <true/> tag - the bolt text - so your file appears as shown below:
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
(Spaces between lines added only for clarity - I don't think they will hurt anything, but you don't need them)
Save this .plist file, then have launchd re-load the updated .plist:
macuser$ launchctl load /Library/LaunchAgents/com.hp.help.tocgenerator.pli
Problem solved - you should be able to look in Console & see that the errors have stopped.
HP - you guys should add these lines to your launchd scripts if you have not already.