Could you please confirm the status of your instance as of now? Are the database issues still occurring? If so could you provide a screenshot of what you see when trying to access the CRM?
Yes sir that issue was not solve yet so i delete that instance and install the new one and its working fine now. But Ya that issue is very sudden and can occur anytime.
When you have no data and little customisation (Especial when your just tinkering about a bit to learn) reinstalling the CRM is acceptable however we really do need to find the main cause of the issue and ensure it is prevented from happening when you decide to go live with your CRM. (I’m assuming that this is not already the case, in short a “Live” instance would be and instance actively being used by the end users.)
How’s the host situation coming alone? Where you able to find a suitable work around? Having command line access is almost if not fully required to run the CRM simply and successfully.
Hello
Live instance is running fine but getting very slow taking very time to load the instance. I don’t know why is it so.
Till Yesterday it was working fine but now is shows error in suitecrm log file MY sql server has gone away
sir i found the issue i wrote one logic hook for accounts but its completely slow down my instance why is it so ?
when i remove that hook intance works fine
Can you send us the logic hook code and where you added it?
Sure sir.
This is the code
<?php
if (!defined('sugarEntry') || !sugarEntry)
die('Not A Valid Entry Point');
class ListData
{
function listing($bean , $event, $arguments)
{
$db = DBManagerFactory::getInstance();
$query ="SELECT * FROM ACCOUNTS";
$result = $db->query($query, true,"Error reading number of accounts: ");
while( $row = $db->fetchByAssoc($result))
{
$parent_id = $row['id'];
$query1 = "SELECT t.parent_id,COUNT(t.id) as countR,tc.* FROM `TASKS` t JOIN TASKS_CSTM tc ON t.id=tc.id_c WHERE t.parent_id = '$parent_id'";
$result1 = $db->query($query1, true,"Error reading number of accounts: ");
while( $row1 = $db->fetchByAssoc($result1))
{
$countR = $row1['countR'];
if($countR == 2)
{
$query2 = "UPDATE ACCOUNTS_CSTM SET order_type_c = 'Both' WHERE id_c = '$parent_id'";
$result2 = $db->query($query2, true,"Error reading number of accounts: ");
}
else if($countR == 1)
{
$query3 = "SELECT tc.select_order_type_c FROM `TASKS` t JOIN TASKS_CSTM tc ON t.id=tc.id_c WHERE t.parent_id = '$parent_id'";
$result3 = $db->query($query3, true,"Error reading number of accounts: ");
$row3 = $db->fetchByAssoc($result3);
$var = $row3['select_order_type_c'];
$query4 = "UPDATE ACCOUNTS_CSTM SET order_type_c = '$var' WHERE id_c = '$parent_id'";
$result4 = $db->query($query4, true,"Error reading number of accounts: ");
}
else{
// echo "No";
}
}
}
}
}
*Edited by staff, try and use the CODE formatting via the forum’s WYSIWYG to make things more readable
Sir i had used SQL queries i think this is the problem.
I had added this code to Logic Hooks in accounts.(after_retrieve).
There is problem in code but where it is i don’t know may be i don’t know how to write SQL queries in suitecrm where is the mistake can you please see it once.
Main thing Code is working fine in localhost. but not in live
Ok Sure Thank you Sir
Hi all,
I think the topic of this thread has again veered off course, let’s keep the future discussion on this topic related only to the original question - Facebook and Twitter lead integration.
@namitkakusuitecrm could you please look at creating a new thread with this logic hook related issue that includes all relevant information you have provide already.
Thanks
Done sir Please check once
Link: Logic Hook working fine in localhost not in cpanel live