2

I have this error:

Possibly unhandled rejection: {"error_code":-1,"sql":"CREATE TEMPORARY TABLE civicrm_tmp_e_exrecipient_dc8f2500b15714f5703ad66bc5a8bb37 (contact_id int primary key) ENGINE=MEMORY COLLATE utf8mb4_unicode_ci","debug_info":"CREATE TEMPORARY TABLE civicrm_tmp_e_exrecipient_dc8f2500b15714f5703ad66bc5a8bb37 (contact_id int primary key) ENGINE=MEMORY COLLATE utf8mb4_unicode_ci [nativecode=3161 ** Storage engine MEMORY is disabled (Table creation is disallowed).]","entity":"Mailing","action":"create","is_error":1,"error_message":"DB Error: unknown error","debug_information":"CREATE TEMPORARY TABLE civicrm_tmp_e_exrecipient_dc8f2500b15714f5703ad66bc5a8bb37 (contact_id int primary key) ENGINE=MEMORY COLLATE utf8mb4_unicode_ci"}

on a civicrm installation which uses a managed database at DigitalOcean.

This happens when adding a new group as recipient of a mailing. Instead of showing the recipients' count, civicrm shows an "estimating" locked message.

I'm pretty sure this is not a problem with civicrm, but with the managed database. Sorry to ask this here, but I'm stuck. Any ideas how to fix this? Thanks.

SOLUTION: Demerit's answer helped me to work around the problem, but the solution came from setting internal_tmp_mem_storage_engine to MEMORY with DigitalOcean API. You need to wait some time for the new setting to have effect.

UPDATE: DigitalOcean disabled the ability to set internal_tmp_mem_storage_engine by setting disabled_storage_engines to "ARCHIVE,BLACKHOLE,CSV,MEMORY,MRG_MYISAM,MyISAM", so the workaround has become the solution :-(

1 Answer 1

2

I would edit CRM/Utils/SQL/TempTable.php and change the 3 places where it says MEMORY to InnoDB instead so it always uses InnoDB.

I would also then enable the scheduled job Clean-up Temporary Data and Files just to make sure those tables get cleaned up.

5

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.