Hi there,

I have been using this (great! 7.x-1.2+5-dev) module for some time now (and the sub module search by page nodes), and I ran into some strange problems recently (I don't know exactly when the problems started, I have seen them since 2 days now). When searching for some specific terms on both the Search-by-page page or the Search-by-page tab on the default search page, I get a white screen, which seems to be caused by a 500 internal server error. Also cron breaks every time now, because of the same server error. When searching for other terms than these specific ones, the search results show up normally though!

Next problem is that after a couple of hours playing around, the max_user_connections error shows up, because too many connection to mysql were made. This is fixed easily by restarting mysql, but that's no long term solution of course.

When I disable the search by page module, cron runs without problems, no server errors show up then. But I would really like to use this module, so I can search my views generated content...

Any suggestions? Very welcome!

Comments

NicoDruif’s picture

If you want I can give you an account in our development environment, so you can see the problems for yourself... Let me know.

NicoDruif’s picture

I also asked my webhost to give me some logging details of the max_user_connections, so we may get some process/mysql information about what caused the not closed connections...

jhodgdon’s picture

Category: bug » support
Priority: Critical » Normal
Status: Active » Fixed

Hmm. Obviously Search by Page has not changed recently, so something must have changed recently on your site, your database, or your hosting company that triggered the problem.

Since it is only some specific search terms and during cron, I think it's most probable that the problem is a PHP error, redirect, or weird PHP interaction with Search by Page on a particular URL that is being indexed by Search by Page... What happens is that when Search by Page does a search on that page, or tries to re-index that page during cron, it tries to render the page, so if that page has a PHP problem, Search by Page will have that same problem.

Given that you know what search terms trigger the error, maybe you can think about what page/content you might have either recently added or updated on your site, or recently added as a Search by Page page to index, that contains those keywords. I think you will find that the problem is there rather than in Search by Page itself.

If you have further questions, feel free to provide more information and open this issue back up...

NicoDruif’s picture

Priority: Normal » Major
Status: Fixed » Active

Thanks for the quick reply. Hmm again :). I understand that you point to recently added or changed content, or other changes on the site. But I can't think of any. I use the module only for indexing one specific content type and no new nodes of this type have been added. No other changes to the pages have been made. Still, you may be right.

I will manually open all the nodes of this content type to check if they are rendered without problems. If I see no problems in my browser, then it should be indexed alright too right? I do not use redirects. Only url aliases.

And I will get back to you with logs of the hosting company.

NicoDruif’s picture

This is what I found after some testing:

- I see no (PHP or other) errors when opening the nodes of the content type that get indexed by Search by page manually in my browser

- I disabled, deleted and then installed a new clean Search by page 7.x-1.x-dev module (to be sure). I disabled surrounding blocks like my superfish dropdown menu and sidebars. Then created a new content type (a very simple one, only a title and one textarea), and set up a new Search by page search environment for this content type only. Then I added one new node of this content type and ran cron to start indexing. All works fine! Then I added one other node of this type and ran cron again: all works fine, still no errors. In the database in the search dataset I see the nodes have been added just fine.

- But: when I add more than one node of this content type and then run cron, cron returns a white screen and in the headers I see the 500 internal server error again.. :(. So it seems that if Search by page has to index more than one new node, it stops working correctly. In the database I also see that only one of the nodes have been added (so for example 2 others should still be indexed), although the search settings page says that Search by page has been fully indexed, which is just not right..? Could there be an autoincrement error or so?

- Then finally, I did all the same in the Bartik theme... And Search by page works fine then in all cases, also when multiple nodes have to be indexed! Hmmm, so the problem really seems to have to do with my theme settings. I am really curious what will be causing this.

I will now go and disable more blocks and custom php templates. See what happens...

Any suggestions still very welcome!

NicoDruif’s picture

This would be a very good idea to see all php errors:
http://drupal.org/node/1056468

I am on to something now...

NicoDruif’s picture

Status: Active » Fixed

YES!

After I enabled all PHP error notices, I did find a PHP error after all! Something was wrong with a block whose visibility is determined by PHP. I had temporarily added a function declaration in this block, and thought this block had been deleted by the Finder module which generated this block. But the PHP error pointed to this function declaration (which was declared multiple times for every node Search by page tried to index) so the block must still be there somehow. It did not show up in the blocks overview page, but it did in the blocks database table! After I manually removed this block from the blocks database table, everything worked fine again!

So: fixed! And in the end, it had nothing to do with the Search by page module indeed!

jhodgdon’s picture

Great, glad you found the error! Enjoy the module. :)

NicoDruif’s picture

Status: Fixed » Closed (fixed)