Ok I have done a little digging…
This is what happens, when Catalog Search Index is being reindexed or when a product is being saved, the catalogsearch_query, catalogsearch_fulltext and catalogsearch_results tables get updated.
Now when someone performs a search on the front end magento tries to update the catalogsearch_query table, (but for some reason in the new code in 1.7) the thread just sits waiting for the re-index to be finished before it will return a result. (1.6.1 did not have this issue ,it would return the results even if a reindex was running)
So, just changing the innodb_lock_wait_timeout to a higher limit will not solve the issue since the search results are waiting until after the reindex finishes (which can take hours), but on the front end the search page is just hanging waiting for mysql to return a result.
I think that this is a major bug, but I’m not sure if it’s just my install or if it’s happening to others as well, but as usual this forum is no help, so I guess I will just create a fresh install on a test box and load it up with 10,000 or so products and see if I can reproduce this issue…
I’ll post an update later if anyone cares.