AnsweredAssumed Answered

Can't select Leads with some accounts - MySQL query never finish

Question asked by Diwljina Diwljina on Jul 23, 2014
Hello,    Some users can't select Leads module. It happens with old accounts (year old) or new one, just created. Selecting Leads just returns an error. In my case "internal server error", that is, PHP timeout. Problem is with MySQL. It's on the top of the "top" command with 100% CPU usage.     Looking at MySQL processlist, query that should return leads page got stuck: 
  SELECT count(*) c FROM leads  LEFT JOIN leads_cstm ON = leads_cstm.id_c   LEFT JOIN  users jt0 ON AND jt0.deleted=0 AND jt0.deleted=0 where (( IN (select * from (SELECT eabr.bean_id FROM email_addr_bean_rel eabr JOIN email_addresses ea ON ( = eabr.email_address_id) WHERE eabr.deleted=0 AND ea.email_address LIKE '') email_derived))) AND leads.deleted=0  
    Other users don't have this problem and query is executed very fast. I tried repair tools (Quick Repair and Rebuild, Rebuild Relationships, Repair Roles...) and tried deleting content of the cache directory. Nothing helped. When this happens with new account, I just create new one and that one works, but now I have problem with an old account that can't be discarded.     Sugar Version: 6.5.13 (Build 1041)  Sugar Edition: CE  Operating System: CentOS 6.5  PHP version: 5.3.3  Web server: Apache 2.2.15  Database: MySQL 5.1.73    sugarcrm.log don't show anything. When raised log level to "error", I got "Unable to load custom logic file: include/SugarSearchEngine/SugarSearchEngineQueueManager.php", but IDs belong to other users as well, not just this one with the problem, so I guess it is not related.    Does anyone knows what could be the problem and how to repair this account?