Title: Memory errors
Last modified: August 22, 2016

---

# Memory errors

 *  [MoniqueR](https://wordpress.org/support/users/moniquer/)
 * (@moniquer)
 * [11 years, 7 months ago](https://wordpress.org/support/topic/memory-errors-2/)
 * A few days ago Relevanssi was working just fine on my website. But today I noticed
   that every search results in “no-results”
 * If I enable debug is true I get the following errors:
 *     ```
       WordPress database error: [Out of memory (Needed 1048548 bytes)]
       SELECT COUNT(DISTINCT(relevanssi.doc)) FROM jaba_relevanssi AS relevanssi
   
       WordPress database error: [Out of memory (Needed 1048548 bytes)]
       SELECT COUNT(DISTINCT(relevanssi.doc)) FROM jaba_relevanssi AS relevanssi WHERE relevanssi.term = 'school' AND ((relevanssi.doc IN (SELECT DISTINCT(posts.ID) FROM jaba_posts AS posts WHERE posts.post_type IN ('post', 'page', 'attachment', 'inzendingen'))) OR (doc = -1))
   
       WordPress database error: [You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 3]
       SELECT COUNT(DISTINCT(relevanssi.doc)) FROM jaba_relevanssi AS relevanssi WHERE (relevanssi.term LIKE 'school%' OR relevanssi.term_reverse LIKE CONCAT(REVERSE('school), %')) AND ((relevanssi.doc IN (SELECT DISTINCT(posts.ID) FROM jaba_posts AS posts WHERE posts.post_type IN ('post', 'page', 'attachment', 'inzendingen'))) OR (doc = -1))
   
       WordPress database error: [Out of memory (Needed 1048548 bytes)]
       SELECT COUNT(DISTINCT(relevanssi.doc)) FROM jaba_relevanssi AS relevanssi WHERE (term LIKE '%school' OR term LIKE 'school%') AND ((relevanssi.doc IN (SELECT DISTINCT(posts.ID) FROM jaba_posts AS posts WHERE posts.post_type IN ('post', 'page', 'attachment', 'inzendingen'))) OR (doc = -1))
   
       WordPress database error: [You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 3]
       SELECT COUNT(DISTINCT(relevanssi.doc)) FROM jaba_relevanssi AS relevanssi WHERE (relevanssi.term LIKE 'school%' OR relevanssi.term_reverse LIKE CONCAT(REVERSE('school), %')) AND ((relevanssi.doc IN (SELECT DISTINCT(posts.ID) FROM jaba_posts AS posts WHERE posts.post_type IN ('post', 'page', 'attachment', 'inzendingen'))) OR (doc = -1))
       ```
   
 * State of the Index:
    Documents in the index: Terms in the index: 4483 Highest
   post ID indexed: 2043
 * (I only have 80 posts, because I just started my website) Could you please help
   solvinf the problem?
 * Regards,
    Monique
 * [https://wordpress.org/plugins/relevanssi/](https://wordpress.org/plugins/relevanssi/)

Viewing 8 replies - 1 through 8 (of 8 total)

 *  Plugin Author [Mikko Saari](https://wordpress.org/support/users/msaari/)
 * (@msaari)
 * [11 years, 7 months ago](https://wordpress.org/support/topic/memory-errors-2/#post-5455513)
 * There are odd errors in your database queries:
 * CONCAT(REVERSE(‘school), %’))
 * Is this a direct copy-paste? Because that should be
 * CONCAT(REVERSE(‘school’), ‘%’))
 * Something’s off there. As for the out of memory errors, there’s little that can
   be done there. If 80 posts is causing out of memory errors, you’re probably better
   off with a search solution that is external to your site, for example Swiftype
   or Addsearch.
 *  Thread Starter [MoniqueR](https://wordpress.org/support/users/moniquer/)
 * (@moniquer)
 * [11 years, 7 months ago](https://wordpress.org/support/topic/memory-errors-2/#post-5455545)
 * Hello Mikko,
 * I I enable debug in my wp-config this is indeed the message that gets displayed
   in screen. What can be wrong? I did not change any code of changed anything in
   the database and it worked before.
 *  Plugin Author [Mikko Saari](https://wordpress.org/support/users/msaari/)
 * (@msaari)
 * [11 years, 7 months ago](https://wordpress.org/support/topic/memory-errors-2/#post-5455573)
 * Do you have any filter functions that affect Relevanssi?
 *  Thread Starter [MoniqueR](https://wordpress.org/support/users/moniquer/)
 * (@moniquer)
 * [11 years, 7 months ago](https://wordpress.org/support/topic/memory-errors-2/#post-5455579)
 * I do have a few filter functions in my funtions.php.
    If it is relevant to post
   or email them, please let me know
 *  Plugin Author [Mikko Saari](https://wordpress.org/support/users/msaari/)
 * (@msaari)
 * [11 years, 7 months ago](https://wordpress.org/support/topic/memory-errors-2/#post-5455657)
 * If they affect Relevanssi, then yes, they may contain some clues to why Relevanssi
   is not working properly.
 *  Thread Starter [MoniqueR](https://wordpress.org/support/users/moniquer/)
 * (@moniquer)
 * [11 years, 7 months ago](https://wordpress.org/support/topic/memory-errors-2/#post-5455658)
 * That is not the problem. I just tested it by disbaling them and used a ‘fresh’
   functions.php….
 *  Thread Starter [MoniqueR](https://wordpress.org/support/users/moniquer/)
 * (@moniquer)
 * [11 years, 7 months ago](https://wordpress.org/support/topic/memory-errors-2/#post-5455659)
 * Update, I have disabled every plugin, switched theme to Twenty Fourteen but it
   makes no difference.
    I also enabled debug=true and no errors appear anywhere
   except in backend on relevanssi page (/wp-admin/options-general.php?page=relevanssi/
   relevanssi.php) and in front-end on search result page
 * Backend on top of page:
    WordPress database error: [Out of memory (Needed 1048548
   bytes)] SELECT COUNT(DISTINCT doc) FROM jaba_relevanssi On bottom of page: WordPress
   database error: [Out of memory (Needed 1048548 bytes)] SELECT COUNT(DISTINCT(
   doc)) as cnt, term FROM jaba_relevanssi GROUP BY term ORDER BY cnt DESC LIMIT
   25
 *  Plugin Author [Mikko Saari](https://wordpress.org/support/users/msaari/)
 * (@msaari)
 * [11 years, 7 months ago](https://wordpress.org/support/topic/memory-errors-2/#post-5455693)
 * Looks like your site just might not be compatible with Relevanssi, then.

Viewing 8 replies - 1 through 8 (of 8 total)

The topic ‘Memory errors’ is closed to new replies.

 * ![](https://ps.w.org/relevanssi/assets/icon-256x256.png?rev=3529670)
 * [Relevanssi - A Better Search](https://wordpress.org/plugins/relevanssi/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/relevanssi/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/relevanssi/)
 * [Active Topics](https://wordpress.org/support/plugin/relevanssi/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/relevanssi/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/relevanssi/reviews/)

 * 8 replies
 * 2 participants
 * Last reply from: [Mikko Saari](https://wordpress.org/support/users/msaari/)
 * Last activity: [11 years, 7 months ago](https://wordpress.org/support/topic/memory-errors-2/#post-5455693)
 * Status: not resolved