Iām on a shared server and canāt access the php.ini. What I found that i should write into the .htaccess. So i tried to write those lines into the htaccess in the suitecrm folder:
If you really want to debug this you can try scattering some extra logging lines in there and see how far it goes through the process, and where it fails.
i did that and insert extra logging lines and the result is:
Sun Mar 25 16:37:52 2018 [5868][1][INFO] Error12
Sun Mar 25 16:37:52 2018 [5868][1][INFO] Error13
Sun Mar 25 16:37:52 2018 [5868][1][INFO] Error12
Sun Mar 25 16:37:52 2018 [5868][1][INFO] Error13
Sun Mar 25 16:37:52 2018 [5868][1][INFO] Error12
Sun Mar 25 16:37:52 2018 [5868][1][INFO] Error13
Sun Mar 25 16:37:52 2018 [5868][1][INFO] Error12
Sun Mar 25 16:37:52 2018 [5868][1][INFO] Error13
Sun Mar 25 16:37:52 2018 [5868][1][INFO] Error12
Sun Mar 25 16:37:52 2018 [5868][1][INFO] Error13
Sun Mar 25 16:37:52 2018 [5868][1][INFO] Error12
Sun Mar 25 16:37:52 2018 [5868][1][INFO] Error13
Sun Mar 25 16:37:52 2018 [5868][1][INFO] Error12
Sun Mar 25 16:37:52 2018 [5868][1][INFO] Error13
Sun Mar 25 16:37:52 2018 [5868][1][INFO] Error12
Sun Mar 25 16:37:52 2018 [5868][1][DEBUG] Hook called: ::server_round_trip
Sun Mar 25 16:37:52 2018 [5868][1][DEBUG] Calling MySQLi::disconnect()
Sun Mar 25 16:37:52 2018 [5868][1][FATAL] Job ad6188b4-9d11-5e6e-8610-5ab7b4af5d51 (Datenbank am 1. des Monats sƤubern) failed in CRON run
The error 12 and 13 log are in the following lines:
Line 316 on:
// make a backup INSERT query if we are deleting.
while ($aDel = $db->fetchByAssoc($rDel, false)) {
// build column names
[b]$GLOBALS['log']->info('Error12');[/b]
$queryString[] = $db->insertParams($table, $columns, $aDel, null, false);
[b]$GLOBALS['log']->info('Error13');[/b]
if (!empty($custom_columns) && !empty($aDel['id'])) {
$GLOBALS['log']->info('Error21');
$qDelCstm = 'SELECT * FROM ' . $table . '_cstm WHERE id_c = ' . $db->quoted($aDel['id']);
$GLOBALS['log']->info('Error22');
$rDelCstm = $db->query($qDelCstm);
$GLOBALS['log']->info('Error14');
It would be better to print some variable names instead of just ā12ā or ā13ā, like this
$GLOBALS['log']->info("Error13, table is $table");
note that you need to change the single-quote to double-quote for this to work.
Also, that is not the best place to focus your attention, you need to start by figuring out where you are in the larger loops. So perhaps printing table name before lines 331 and 335.
so I did that with the following error-codes in the script:
if (!empty($custom_columns) && !empty($aDel['id'])) {
$qDelCstm = 'SELECT * FROM ' . $table . '_cstm WHERE id_c = ' . $db->quoted($aDel['id']);
$rDelCstm = $db->query($qDelCstm);
// make a backup INSERT query if we are deleting.
while ($aDelCstm = $db->fetchByAssoc($rDelCstm)) {
$queryString[] = $db->insertParams($table, $custom_columns, $aDelCstm, null, false);
} // end aDel while()
$GLOBALS['log']->info("Error13, table is $table");
$db->query('DELETE FROM ' . $table . '_cstm WHERE id_c = ' . $db->quoted($aDel['id']));
}
} // end aDel while()
// now do the actual delete
$GLOBALS['log']->info("Error14, table is $table");
$db->query('DELETE FROM ' . $table . ' WHERE deleted = 1');
} // foreach() tables
and the debug is:
Tue Mar 27 08:19:02 2018 [6005][1][INFO] Query Execution Time:8.79764556885E-5
Tue Mar 27 08:19:02 2018 [6005][1][INFO] Query:DESCRIBE jjwg_markers
Tue Mar 27 08:19:02 2018 [6005][1][INFO] Query Execution Time:0.000519037246704
Tue Mar 27 08:19:02 2018 [6005][1][INFO] Query:SELECT * FROM jjwg_markers WHERE deleted = 1
Tue Mar 27 08:19:02 2018 [6005][1][INFO] Query Execution Time:7.89165496826E-5
Tue Mar 27 08:19:02 2018 [6005][1][INFO] Error14, table is jjwg_markers
Tue Mar 27 08:19:02 2018 [6005][1][INFO] Query:DELETE FROM jjwg_markers WHERE deleted = 1
Tue Mar 27 08:19:02 2018 [6005][1][INFO] Query Execution Time:8.70227813721E-5
Tue Mar 27 08:19:02 2018 [6005][1][INFO] Query:DESCRIBE jjwg_markers_audit
Tue Mar 27 08:19:02 2018 [6005][1][INFO] Query Execution Time:0.000483989715576
Tue Mar 27 08:19:02 2018 [6005][1][INFO] Query:DESCRIBE job_queue
Tue Mar 27 08:19:02 2018 [6005][1][INFO] Query Execution Time:0.000529050827026
Tue Mar 27 08:19:02 2018 [6005][1][INFO] Query:SELECT * FROM job_queue WHERE deleted = 1
Tue Mar 27 08:19:02 2018 [6005][1][INFO] Query Execution Time:0.13379907608
Tue Mar 27 08:19:08 2018 [6005][1][DEBUG] Hook called: ::server_round_trip
Tue Mar 27 08:19:08 2018 [6005][1][DEBUG] Calling MySQLi::disconnect()
Tue Mar 27 08:19:08 2018 [6005][1][FATAL] Job 1ee60ff3-2e61-474e-00d4-5ab9e2781b1d (Datenbank am 1. des Monats sƤubern1) failed in CRON run
Tue Mar 27 08:19:08 2018 [6005][1][INFO] Resolving job 1ee60ff3-2e61-474e-00d4-5ab9e2781b1d as failure: Unerwarteter Fehler, bitte Ć¼berprĆ¼fen Sie die Logs von SuiteCRM und php.
Tue Mar 27 08:19:08 2018 [6005][1][DEBUG] Hook called: SchedulersJobs::job_failure
Error13 isnāt ocurring in the debug. And Error 14 isnāt ocurring for table job_queue. In general every run stops at job_queue.
I finally was able to solve the problem. Thank you to your help! I cleaned the job_queue table manually and ran the prune DB scheduler again and it work!
Normally I donāt advise just clearing everything from the job_queue table. You can delete only jobs that are already finished, or that are older than one month, etc. But Iām glad you got it working now.