Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

For anyone else getting annoying com.hp.help.tocgenerator messages

If you've gotten annoying messages in console / log that look like this:

Dec 14 09:35:04 iMac com.apple.launchd.peruser.502[15393] (com.hp.help.tocgenerator): Throttling respawn: Will start in 7 seconds
Dec 14 09:35:11 iMac com.apple.launchd.peruser.501[11945] (com.hp.help.tocgenerator): Throttling respawn: Will start in 3 seconds
Dec 14 09:35:14 iMac com.apple.launchd.peruser.502[15393] (com.hp.help.tocgenerator): Throttling respawn: Will start in 7 seconds
Dec 14 09:35:21 iMac com.apple.launchd.peruser.501[11945] (com.hp.help.tocgenerator): Throttling respawn: Will start in 3 seconds


And you knew it was related to some HP software -- maybe the printer software -- but weren't sure what was going on or how to get rid of it, here's an answer courtesy of 'Jourh':

http://h30434.www3.hp.com/t5/Mac-printing-and-scanning/PhotoSmart-C4280-repeatin g-error-messages-in-system-log/td-p/413203

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.plist*

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.plist*

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.


I hope this helps others as it helped me.

iMac 9,1 / MBP 3,1, Mac OS X (10.6.6), MBP (10.6.6)/iMac (10.6.6)/iPhone 4 (4.1)/iPad (4.2.1)

Posted on Mar 19, 2011 5:55 AM

Reply
14 replies

Aug 15, 2011 7:59 AM in response to joseph_chapman

Actually, it's not the only answer. 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.


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.plist


this unloads the .plist, in case you haven't done this already.



macuser$ sudo vi /Library/LaunchAgents/com.hp.help.tocgenerator.plist


you'll need to use sudo to gain access to the file and be able to save the changes.


The file will look like this, without the 2 lines of bold text towards the end.


Add the <key>LaunchOnlyOnce</key> and the <true/> tag 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">

<plist version="1.0">

<dict>

<key>RunAtLoad</key>

<true/>

<key>WatchPaths</key>

<array>

<string>/Library/Documentation/Help/Hewlett-Packard</string>

<string>/Library/Documentation/Help/Hewlett-Packard/</string>

</array>

<key>ProgramArguments</key>

<array>

<string>/Library/Documentation/Help/Hewlett-Packard/TOCGenerator.app/Contents/M acOS/TOCGenerator</string>

</array>

<key>Label</key>

<string>com.hp.help.tocgenerator</string>


<key>LaunchOnlyOnce</key>

<true/>


</dict>

</plist>


(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.plist


Problem solved - you should be able to look in Console & see that the errors have stopped.

Nov 9, 2011 8:51 PM in response to ktbos

That's a very useful (and a little obscure) command to know about. 🙂 I actually discovered it working with another application's launch script.


I found this thread searching for info on this issue too, after finding my log files full of these entries. I recognized the symptom described by Jourh (continuous respawning by LaunchAgent) so I tested it here, and thankfully it worked.

Oct 26, 2013 1:28 PM in response to willowhaus

If anyone is still listening:


(I'm investigating this after these messages started appearing in my log after a bumpy Mavericks upgrade)


the problem actually seems to be that the launchd job is meant to run any time the HP help directory is modified - makes sense: you put new files in there, they get indexed automagically. But what happens is that the index process modifies the very directory that triggers it to run. Thus, infinite loop. (The job is actually neither crashing, nor reporting an error)


Weird thing is, why doesn't everyone get this and why do I only start getting it after a Mavericks upgrade? I suspect HP disables it, but it can sometimes get enabled if things get set back to defaults.

Feb 3, 2014 5:11 PM in response to Piers Goodhew

In case this helps anyone, we spent months trying to get a trading platform to run. As it turns out, the code above helped but ---it was the voice dictation that was interfering with launching the program. We had at least a half dozen tech support people share our screen and try to figure out why we got the infinite beach ball spinning. When we turned off the voice dictation and entered the code above from Joseph Chapman --finally, the platform launched! Thank you, thank you, thank you!

Aug 8, 2014 4:12 PM in response to joseph_chapman

I'm having a similar problem but for different apps. I have these two entries in my console:


FridayAug/8/14 4:08:34.433 PM com.apple.launchd.peruser.501[179]: (com.eltima.FolxAgent[16578]) Job failed to exec(3) for weird reason: 13

FridayAug/8/14 4:08:34.433 PM com.apple.launchd.peruser.501[179]: (com.eltima.FolxAgent) Throttling respawn: Will start in 10 seconds


FridayAug/8/14 4:08:22.439 PM com.apple.launchd.peruser.501[179]: (ws.agile.1PasswordAgent[16563]) Job failed to exec(3) for weird reason: 13

FridayAug/8/14 4:08:22.439 PM com.apple.launchd.peruser.501[179]: (ws.agile.1PasswordAgent) Throttling respawn: Will start in 10 seconds


However, I have no plists in the folder /Library/LaunchAgents that contain either Folx nor 1Password in them.


Where the heck are they coming from and how do I stop them from recurring?


NOTE: I'm running 10.9.2 (Mavericks)

Jul 9, 2015 2:42 PM in response to Stf

Hmmm, I have a similar Lexmark console message


09/07/2015 22:09:50.212 com.apple.launchd.peruser.501[152]: (com.lexmark.bmlaunchd) Throttling respawn: Will start in 10 seconds


repeated endlessly.



I tried the terminal commands (replacing the HP plist with the Lexmark one) to no avail so thought I probably had some syntax wrong and went in to both /Library and user/Library > Launchagents and there is NOTHING from Lexmark. I have trawled the Libraries and found no Lexmark files. Could anyone be kind enough to post a suggestion as to where else I might find and KILL this annoying loop.


Warm Regards



Steve

For anyone else getting annoying com.hp.help.tocgenerator messages

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.