I updated a site to 8.x3.9 yesterday and in the middle of the night, the site went down. Accessing the site reports it can not find the table cleantalk_sfw.

I was able to restore the DB locally and disable the cleantalk module with Drush and then review the Drupal logs. This was the first error below.

Drupal\Core\Database\DatabaseExceptionWrapper: SQLSTATE[HY000]: General error: 1030 Got error -1 from storage engine: TRUNCATE TABLE `cleantalk_sfw`; Array ( ) in Drupal\cleantalk\lib\Cleantalk\ApbctDrupal\SFW->universal_query() (line 21 of /home/onlinerobot/public_html/web/modules/contrib/cleantalk/src/lib/Cleantalk/ApbctDrupal/SFW.php)

After the logs are full of SQL errors - not able to find the cleantalk_sfw table and it was not present via phpmyadmin.

I un-installed cleantalk with drush and had to drop the database completely on the live server and restore from the local database with the module disabled.

Not sure if this is an isolated MySQL / Server issue or if this is related to the 3.9 release.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

blainelang created an issue. See original summary.

Serge-M’s picture

Hello.

Thank you for your request-letter.

We will investigate it as soon as possible and contact you when we get any results.
It may take up to 1-2 business days. Please, wait.

Your CleanTalk Control Panel: [ https://cleantalk.org/my/ ].

Best regards.

blainelang’s picture

FileSize
65.98 KB
71.19 KB

I upgraded 3 more sites to Drupal 8.9.1 from Drupal 8.81 and two of the sites crashed over night with the same issue.

Drupal\Core\Database\DatabaseExceptionWrapper: SQLSTATE[HY000]: General error: 1030 Got error -1 from storage engine: TRUNCATE {cleantalk_sfw_logs}; Array ( ) in Drupal\cleantalk\CleantalkSFW->send_logs() (line 199 of /home/emcourse/public_html/web/modules/contrib/cleantalk/src/CleantalkSFW.php)

We had to drop the complete database as before because even though all the tables were deleted, an import would fail trying to create the cleantalk table. As can be seen in the image below, the table cleantalk_sfw appears in the left pane but is not listed in the database tables - it's there but not there.

cleantalk_sfw table

The cleantalk module may be the only module that does a MySQL truncate vs deleting all records. The truncate statement is different as described in this MySQL documentation page.

The 3 sites that were updated yesterday did not include the update of the cleantalk module. Version 3.4 was not updated, as it was the version that had been running fine. One of the sites updated to Drupal 8.9.1 and other site modules, did not have the issue but I don't know if the over nightly cleantalk maintenance routine ran on that site or when/how that job is scheduled.

The site that crashed earlier this week kept running and it's also running version 3.4. It crashed as first reported with version 3.9 but I felt that version 3.4 which had been running fine would be ok so I downgraded the module on that site. It has not had any site issues since that (a couple days).

The 2 affected sites were restored from backups. All 4 sites now have cleantalk disabled, until we can feel confident the issue has been solved.

The sites are all running the same PHP, MySQL and base server setup - see image below.
Site Status

znaeff’s picture

Hello,

Thank you for your great feedback.

We will check this soon, it needs a few days.

Best regards,

znaeff’s picture

FileSize
58.98 KB

We have fixed the backquotes issue.

The dev version in the attachment.

Contact us if something goes wrong.

Be well,

blainelang’s picture

Sorry for the delay, I was away on vacation.

I have installed the patched version on one of the sites and will monitor it for a week or so and let you know.
Will need a dev or proper release to deploy via composer.

Serge-M’s picture

Hello.

No problem. Feel free to write to us any day.

All the best.

Janner’s picture

Is there any update on a fix for this?

I had been trialling the service, and all had looked encouraging for the first few days. Then I woke to find that CleanTalk had crashed my site overnight as like the OP.

I've removed the module for now, but am keen to take another look once this bug has been addressed.

znaeff’s picture

FileSize
58.98 KB

Hello,

The patched version should fix the issue.

Please try it.

blainelang’s picture

Are both of these zip files the same?

znaeff’s picture

Yes.

blainelang’s picture

Thanks @znaeff, are you expecting to roll this into a new version soon?

znaeff’s picture

Yes, I think we will release a new version within 2-3 weeks

blainelang’s picture

Hi znaeff, just checking in to see about rolling a new release. Our clients sites still are running with the cleantalk module uninstalled and are manually handling the spam.

- Blaine

blainelang’s picture

Any update on a new release. We had another site running 8.x-3.9 on Drupal 8.9.1 crash yesterday and required a complete database restore.

Serge-M’s picture

Hello.

I've replied to you in the private ticket.

pifagor’s picture

FileSize
19.41 KB

Added patch. Checked on PostgreSQL.

znaeff’s picture

Hello, pifagor
Thank you for the patch.
Best regards,

pifagor’s picture

Status: Active » Needs review

You are welcome :)

znaeff’s picture

Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.