Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

A possible solution for system hang on Safari launch Web Browsers
Recently, any time I tried to run Safari on 10.6 caused all apps and the Finder to hang with the spinning beach ball. Force-quitting Safari stopped the problem, but it would occur again on the next launch. Googling around, I saw many folks reporting similar problems, but no solutions.

The /var/log/system.log file shows something like this when this hang occurs:

Nov 13 09:51:16 bvmbook Safari[394]: INSERT-HANG-DETECTED: Tx time:46.498542, # of Inserts: 0, # of bytes written: 0, Did shrink: YES

Sounds like a database problem. So I looked at which database-type files were opened by Safari, with this in Terminal:
sh-3.2# lsof / | grep Safari |grep db
Safari    544       vanetten  txt    REG   14,2     32768 3762252 /private/var/db/mds/messages/se_SecurityMessages
Safari    544       vanetten  txt    REG   14,2     51288 3764181 /private/var/folders/L2/L2wz7UsyFWOAKlDB6i6RqE+++TM/-Caches-/mds/mdsDirectory.db
Safari    544       vanetten  txt    REG   14,2 197840896 3762198 /private/var/db/dyld/dyld_shared_cache_x86_64
Safari    544       vanetten    5u   REG   14,2     36864 3764157 /Users/vanetten/Library/Safari/WebpageIcons.db
Safari    544       vanetten    6u   REG   14,2  39143424 2858942 /private/var/folders/L2/L2wz7UsyFWOAKlDB6i6RqE+++TM/-Caches-/com.apple.Safari/SafeBrowsing.db
Safari    544       vanetten    7u   REG   14,2    724992 3764162 /Users/vanetten/Library/Caches/com.apple.Safari/Cache.db
I found that if I quit Safari and deleted the *.db files in my home directory, the problem goes away:
sh-3.2# rm /Users/vanetten/Library/Safari/WebpageIcons.db /Users/vanetten/Library/Caches/com.apple.Safari/Cache.db /Users/vanetten/Library/Caches/com.apple.Safari/Cache.db-journal
I'm not sure which of these files were corrupt, but launching Safari seems to re-create them.
    •    
  • Currently 2.43 / 5
  You rated: 3 / 5 (28 votes cast)
 
[14,720 views]  

A possible solution for system hang on Safari launch | 4 comments | Create New Account
Click here to return to the 'A possible solution for system hang on Safari launch' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
A possible solution for system hang on Safari launch
Authored by: amoeba54 on Nov 24, '09 09:31:22AM

I've had a hang on loading of Safari for some time but no entries in my error log. I only use Safari occasionally so it hasn't been a big deal.

Deleted ~/Library/Application Support/Safari alltogether things seem peachy now. First launch took a while, must've been creating its databases. Subsequent launches are no longer hanging.

Thanks for the idea!



[ Reply to This | # ]
A possible solution for system hang on Safari launch
Authored by: umijin on Nov 25, '09 06:48:26AM

Iím having the same problem on my MB Air, but usually only when I'm accessing the net from networks outside my home (work & lab). I'll give your fix a try.



[ Reply to This | # ]
A possible solution for system hang on Safari launch
Authored by: Brad Puett on Dec 08, '09 05:43:33PM
Wouldn't it be better to post these commands to remove the files with a tilde "~" instead of leaving in "/Users/vanetten" ?

So the commands should be

rm ~/Library/Safari/WebpageIcons.db ~/Library/Caches/com.apple.Safari/Cache.db ~/Library/Caches/com.apple.Safari/Cache.db-journal

OR (if you like single commands)

rm ~/Library/Safari/WebpageIcons.db
rm ~/Library/Caches/com.apple.Safari/Cache.db
rm ~/Library/Caches/com.apple.Safari/Cache.db-journal

(I couldn't find that user named "vanetten" anywhere on my system! :^)

Interestingly, I could delete the 1st two files, but didn't have the "Cache.db-journal" file ...

[ Reply to This | # ]

A possible solution for system hang on Safari launch
Authored by: MichalM.Mac on Jan 26, '11 06:28:19AM

I think this issue is related to webkit/network somehow.

INSERT-HANG-DETECTED <--- Safari 5.0.3 and latest Twitter and NetNewsWire Applications.



[ Reply to This | # ]