phenaproxima / starshot-prototype

Prototype of a new kind of Drupal, based on recipes and loaded up with contrib's best modules and themes. Not a fork or a distribution.
https://drupal.org/starshot
106 stars 36 forks source link

DDEV SQLSTATE[HY000]: General error: 11 database disk image is malformed #59

Closed tsega closed 1 month ago

tsega commented 2 months ago

I followed the instructions to use DDEV (with v1.23.0):

git clone https://github.com/phenaproxima/starshot-prototype.git starshot
cd starshot && ddev install

The site is installed and I'm able to access it but as soon as I click on any link on the page the site breaks and I get the following error when I try to run any drush command.

SQLSTATE[HY000]: General error: 11 database disk image is malformed 

I tried renaming the file to something like db.sqlite instead of just .sqlite but that doesn't work either.

Same issue also happens in MySQL.

phenaproxima commented 2 months ago

I'm not entirely sure what causes this, or what we can realistically do about it.

A reasonable workaround would be to install into a MySQL database, instead of SQLite (which would be very feasible in DDEV or another Docker-based environment)...except that the drupal install command, which comes from core, hard-codes the use of SQLite.

phenaproxima commented 2 months ago

🤔 As I look at \Drupal\Core\Command\InstallCommand::install(), it looks like it will respect an existing settings.php file, if there is one.

I'll experiment.

Dudeweb commented 2 months ago

ddev install???

I upgraded my ddev and I get this "Error: unknown command "install" for "ddev".

I am ALWAYS disapointed and pissed off with drupal distros. It is a big set back in comparison with drupal 7 that was 100 times easier to handle.

Guys, it seems you wanna spread the usage of drupal but it takes soooooo much time to adapt to every new version every 2 months...

Don't ask yourself why Wordpress is still far away.

It is VERY frustrating.

After the amount of time I spent on Drupal 8-9-10, I should be able to do that kind of SHIT in minutes.

Sorry if I am rough but this is EXACTLY how I feel about Drupal. STill promoting and using but what a pain in the ass!

phenaproxima commented 2 months ago

My dude...getting all pissed off isn't helping anything.

As it happens, we previously encountered that exact problem in testing, and it turns out you need DDEV 1.23.0 or later for custom commands to work. As a result of that finding, we documented it in the README. (See commit 4555ab199b3c369e2ddcd6a482e01225af1591037.) It's right there, below the command. If you update DDEV to at least that version, do you still get that problem?

If not...you're welcome. Please do better next time. I have worked, and continue to work, very hard on this shit.

If you DO still get the problem, then cool -- we can try to fix the bug together. Open a new issue with maybe some exact steps to reproduce and we can dive in.

Oh, and by the way -- you don't have to use DDEV. If you have Composer and PHP set up directly on your host, why not try the composer create-project command directly?

If you insist on DDEV, you could just run the commands in .ddev/commands/host/install sequentially at the command line. The install command was added purely for convenience.

So there you go: you've got options.

Dudeweb commented 2 months ago

Oh! Bro! Sorry, I was stupid to express myself in that way.

It took me at least 6 months to adapt myself to composer etc... I am not a programmer! I have a passive understanding php, I coded before but the aim is to build qui ckly beautifull and functionnal websites, what drupal7 was easy.

Everytime I am getting confident on drupal 9 and 10, something happens that stucks me hours...

It is a long learning curve.

But you guys, you rock! I am always amazed by the energy you put in and when it works it rocks!

It tool me long as well to interface Drupal and Tailwind: twig can be really tricky sometimes as well.

And I can do things quickly now but as I said, how come installing distros is sometimes so painfull? ;-)

I send you a lot of love and gratitude.

I wish you a lot of positive energy to continue on that beautifull path! I'll come back to praise your work as soon as I get it online ;-)

Indeed you are right, I am gonna try on a hosting service.

Dudeweb commented 2 months ago

dudeweb@dudeweb-ThinkPad-T440s:~$ ddev --version Yes I think my DDEV is alright:

ddev version v1.23.0 dudeweb@dudeweb-ThinkPad-T440s:~$ ddev install Error: unknown command "install" for "ddev" Run 'ddev --help' for usage.

phenaproxima commented 2 months ago

Thanks for the kind words. Starshot's not a distro per se, but you're right that Drupal can be very complicated, and painful when things go pear-shaped. One of Starshot's goals is to tame the complexity as far as possible, so I do appreciate bug reports. It really helps.

You're right, your DDEV version looks correct. To be clear -- you're running ddev install from within the Starshot directory, right? Because it's a custom command, DDEV won't be able to find it if you're outside the Starshot git clone.

Dudeweb commented 2 months ago

I asked to AI to rephrase my post. Here it is :-)

"Hey there, guess what surprise I got after upgrading my ddev? The classic 'Error: unknown command "install" for "ddev".' Like, seriously? 😂 It's like ddev decided to play hide and seek with commands! 🙈 And don't even get me started on Drupal distros, always leaving me disappointed and a tad peeved. 🤦‍♂️ It's like they're trying to make Drupal as mysterious as a magic show! 🎩✨ But hey, at least we can all agree on one thing: Drupal's updates are like clockwork, every two months, without fail! ⏰😅 It's like they're on a mission to keep us on our toes! And let's not even mention Wordpress... 🤫 Anyway, rant over, back to figuring out this ddev conundrum! 🤓 #DrupalStruggles #TechAdventures"

I like the #DrupalStruggles LOLOLOL

Dudeweb commented 2 months ago

when I see this post: https://www.rosehosting.com/blog/how-to-install-drupal-on-ubuntu-22-04/

I wonder why I am using DDEV on Linux!

Dudeweb commented 2 months ago

On Ubuntu: In CreateProjectCommand.php line 436:

Could not find package drupal/starshot-project with stability dev in a version installable using your PHP version, PHP extensions and C
omposer version.

phenaproxima commented 2 months ago

That makes sense, this is not published on Packagist. You need to use the full command from the README, including the --repository='{...}' option...if that's not working them I'm not sure what's going on, unless you're on some really ancient Composer version.

mayankguptadotcom commented 2 months ago

@Dudeweb - I've been in the same boat as you. I also feel frustration, for 18 years fighting against Drupalists, and defending WordPress - I know exactly what you are feeling. And as luck played its part - i'm now defending Drupal :) As a non-developer, it can get over-whelming to use Drupal and that's exactly Starshot is trying to solve.

The good thing is that - Drupal community is continuously evolving and the only way we can make it better is by contributing. From my side, I can offer that if you can ping me Drupal Slack, we can go on a quick huddle and try to resolve this on a screenshare. My drupal slack id - mayankguptadotcom (same as this github id)

tsega commented 2 months ago

I'm not entirely sure what causes this, or what we can realistically do about it.

A reasonable workaround would be to install into a MySQL database, instead of SQLite (which would be very feasible in DDEV or another Docker-based environment)...except that the drupal install command, which comes from core, hard-codes the use of SQLite.

@phenaproxima I have already tried removing the .ddev directory and recreating it with a MySQL database. However, the exact thing happens to the site.

@Dudeweb Getting the Drupal Starshot project working on DDEV would be instrumental in its adoption. From the looks of it, this should not be a problem since it is just a Drupal project with some additional contrib modules - nothing out of the ordinary.

We're still in the early stages and it's expected to have such issues come up. Our focus should be on collaborating to make Starshot as easy and straight forward as possible.

tsega commented 2 months ago

@phenaproxima I deleted the site from DDEV and re-created it.

The issue is still there but here is some more information on it.

ddev drush cr

In ExceptionHandler.php line 66:

  SQLSTATE[HY000]: General error: 11 database disk image is malformed: DELETE FROM "cache_bootstrap"; Array  
  (                                                                                                          
  )                                                                                                          

In StatementPrefetchIterator.php line 118:

  SQLSTATE[HY000]: General error: 11 database disk image is malformed  

Failed to run drush cr: exit status 1

I opened the web/sites/default/files/.sqlite file in VSCode SQLite browser and looking at the cache_bootstrap table I get the following.

Screenshot 2024-05-11 at 10 01 59 in the morning

It seems something is writing malformed content into that table.

Note: Earlier I tried using MySQL and the issue is still there.

tsega commented 2 months ago

Moving this further, I SSHed into DDEV and tried to dump the database to another new one:

sqlite3 .sqlite ".dump" | sqlite3 fixed.sqlite

This resulted in the following error messages:

Parse error near line 1103: no such collation sequence: NOCASE_UTF8
Parse error near line 1108: no such table: users
Parse error near line 1109: no such table: users
Parse error near line 1110: no such table: users
Parse error near line 1111: no such collation sequence: NOCASE_UTF8
Parse error near line 1129: no such table: users_field_data
Parse error near line 1130: no such table: users_field_data
Parse error near line 1131: no such table: users_field_data
Parse error near line 1144: no such collation sequence: NOCASE_UTF8
Parse error near line 1153: no such table: path_alias
Parse error near line 1154: no such table: path_alias
Parse error near line 1155: no such table: path_alias
Parse error near line 1156: no such table: path_alias
Parse error near line 1157: no such table: path_alias
Parse error near line 1158: no such table: path_alias
Parse error near line 1159: no such table: path_alias
Parse error near line 1160: no such table: path_alias
Parse error near line 1161: no such table: path_alias
Parse error near line 1162: no such table: path_alias
Parse error near line 1163: no such table: path_alias
Parse error near line 1164: no such table: path_alias
Parse error near line 1165: no such table: path_alias
Parse error near line 1166: no such table: path_alias
Parse error near line 1167: no such table: path_alias
Parse error near line 1168: no such table: path_alias
Parse error near line 1169: no such table: path_alias
Parse error near line 1170: no such table: path_alias
Parse error near line 1171: no such collation sequence: NOCASE_UTF8
Parse error near line 1180: no such table: path_alias_revision
Parse error near line 1181: no such table: path_alias_revision
Parse error near line 1182: no such table: path_alias_revision
Parse error near line 1183: no such table: path_alias_revision
Parse error near line 1184: no such table: path_alias_revision
Parse error near line 1185: no such table: path_alias_revision
Parse error near line 1186: no such table: path_alias_revision
Parse error near line 1187: no such table: path_alias_revision
Parse error near line 1188: no such table: path_alias_revision
Parse error near line 1189: no such table: path_alias_revision
Parse error near line 1190: no such table: path_alias_revision
Parse error near line 1191: no such table: path_alias_revision
Parse error near line 1192: no such table: path_alias_revision
Parse error near line 1193: no such table: path_alias_revision
Parse error near line 1194: no such table: path_alias_revision
Parse error near line 1195: no such table: path_alias_revision
Parse error near line 1196: no such table: path_alias_revision
Parse error near line 1197: no such table: path_alias_revision
Parse error near line 1198: no such collation sequence: NOCASE_UTF8
Parse error near line 1205: no such table: block_content
Parse error near line 1216: no such collation sequence: NOCASE_UTF8
Parse error near line 1229: no such table: block_content_field_data
Parse error near line 1230: no such collation sequence: NOCASE_UTF8
Parse error near line 1241: no such table: block_content_field_revision
Parse error near line 11437: no such collation sequence: NOCASE_UTF8
Parse error near line 11444: no such table: node
Parse error near line 11445: no such table: node
Parse error near line 11457: no such collation sequence: NOCASE_UTF8
Parse error near line 11473: no such table: node_field_data
Parse error near line 11474: no such table: node_field_data
Parse error near line 11475: no such collation sequence: NOCASE_UTF8
Parse error near line 11490: no such table: node_field_revision
Parse error near line 11491: no such table: node_field_revision
Parse error near line 11623: no such collation sequence: NOCASE_UTF8
Parse error near line 11636: no such table: file_managed
Parse error near line 11637: no such table: file_managed
Parse error near line 11638: no such table: file_managed
Parse error near line 11639: no such table: file_managed
Parse error near line 12539: no such collation sequence: NOCASE_UTF8
Parse error near line 12546: no such table: media
Parse error near line 12547: no such table: media
Parse error near line 12548: no such table: media
Parse error near line 12549: no such table: media
Parse error near line 12563: no such collation sequence: NOCASE_UTF8
Parse error near line 12582: no such table: media_field_data
Parse error near line 12583: no such table: media_field_data
Parse error near line 12584: no such table: media_field_data
Parse error near line 12585: no such table: media_field_data
Parse error near line 12586: no such collation sequence: NOCASE_UTF8
Parse error near line 12604: no such table: media_field_revision
Parse error near line 12605: no such table: media_field_revision
Parse error near line 12606: no such table: media_field_revision
Parse error near line 12607: no such table: media_field_revision
Parse error near line 12608: no such collation sequence: NOCASE_UTF8
Parse error near line 12618: no such table: media__field_media_oembed_video
Parse error near line 12619: no such collation sequence: NOCASE_UTF8
Parse error near line 12629: no such table: media_revision__field_media_oembed_video
Parse error near line 12672: no such collation sequence: NOCASE_UTF8
Parse error near line 12678: no such collation sequence: NOCASE_UTF8
Parse error near line 12732: no such collation sequence: NOCASE_UTF8
Parse error near line 12738: no such table: content_moderation_state
Parse error near line 12739: no such table: content_moderation_state
Parse error near line 12748: no such collation sequence: NOCASE_UTF8
Parse error near line 12762: no such table: content_moderation_state_field_data
Parse error near line 12763: no such table: content_moderation_state_field_data
Parse error near line 12764: no such collation sequence: NOCASE_UTF8
Parse error near line 12778: no such table: content_moderation_state_field_revision
Parse error near line 12779: no such table: content_moderation_state_field_revision
Parse error near line 12879: no such collation sequence: NOCASE_UTF8
Parse error near line 12886: no such table: crop
Parse error near line 12887: no such table: crop
Parse error near line 12888: no such table: crop
Parse error near line 12889: no such table: crop
Parse error near line 12903: no such collation sequence: NOCASE_UTF8
Parse error near line 12919: no such table: crop_field_data
Parse error near line 12920: no such table: crop_field_data
Parse error near line 12921: no such table: crop_field_data
Parse error near line 12922: no such table: crop_field_data
Parse error near line 12923: no such collation sequence: NOCASE_UTF8
Parse error near line 12938: no such table: crop_field_revision
Parse error near line 12939: no such table: crop_field_revision
Parse error near line 12940: no such table: crop_field_revision
Parse error near line 12941: no such table: crop_field_revision
Parse error near line 12942: no such collation sequence: NOCASE_UTF8
Parse error near line 12958: no such collation sequence: NOCASE_UTF8
Parse error near line 12975: no such collation sequence: NOCASE_UTF8
Parse error near line 13171: no such collation sequence: NOCASE_UTF8
Parse error near line 13325: no such collation sequence: NOCASE_UTF8
Parse error near line 13332: no such table: menu_link_content
Parse error near line 13333: no such table: menu_link_content
Parse error near line 13334: no such table: menu_link_content
Parse error near line 13335: no such table: menu_link_content
Parse error near line 13336: no such table: menu_link_content
Parse error near line 13337: no such table: menu_link_content
Parse error near line 13353: no such collation sequence: NOCASE_UTF8
Parse error near line 13375: no such table: menu_link_content_data
Parse error near line 13376: no such table: menu_link_content_data
Parse error near line 13377: no such table: menu_link_content_data
Parse error near line 13378: no such table: menu_link_content_data
Parse error near line 13379: no such table: menu_link_content_data
Parse error near line 13380: no such table: menu_link_content_data
Parse error near line 13381: no such collation sequence: NOCASE_UTF8
Parse error near line 13397: no such table: menu_link_content_field_revision
Parse error near line 13398: no such table: menu_link_content_field_revision
Parse error near line 13399: no such table: menu_link_content_field_revision
Parse error near line 13400: no such table: menu_link_content_field_revision
Parse error near line 13401: no such table: menu_link_content_field_revision
Parse error near line 13402: no such table: menu_link_content_field_revision
Parse error near line 13408: no such collation sequence: NOCASE_UTF8
Parse error near line 13414: no such table: shortcut
Parse error near line 13415: no such table: shortcut
Parse error near line 13416: no such table: shortcut
Parse error near line 13417: no such table: shortcut
Parse error near line 13418: no such table: shortcut
Parse error near line 13419: no such table: shortcut
Parse error near line 13420: no such table: shortcut
Parse error near line 13421: no such table: shortcut
Parse error near line 13422: no such table: shortcut
Parse error near line 13423: no such table: shortcut
Parse error near line 13424: no such table: shortcut
Parse error near line 13425: no such collation sequence: NOCASE_UTF8
Parse error near line 13437: no such table: shortcut_field_data
Parse error near line 13438: no such table: shortcut_field_data
Parse error near line 13439: no such table: shortcut_field_data
Parse error near line 13440: no such table: shortcut_field_data
Parse error near line 13441: no such table: shortcut_field_data
Parse error near line 13442: no such table: shortcut_field_data
Parse error near line 13443: no such table: shortcut_field_data
Parse error near line 13444: no such table: shortcut_field_data
Parse error near line 13445: no such table: shortcut_field_data
Parse error near line 13446: no such table: shortcut_field_data
Parse error near line 13447: no such table: shortcut_field_data
Parse error near line 13448: no such collation sequence: NOCASE_UTF8
Runtime error near line 14693: UNIQUE constraint failed: cache_data.cid (19)
Parse error near line 14953: no such table: main.users
Parse error near line 14954: no such table: main.users_field_data
Parse error near line 14955: no such table: main.users_field_data
Parse error near line 14956: no such table: main.users_field_data
Parse error near line 14957: no such table: main.users_field_data
Parse error near line 14958: no such table: main.users_field_data
Parse error near line 14962: no such table: main.path_alias
Parse error near line 14963: no such table: main.path_alias
Parse error near line 14964: no such table: main.path_alias
Parse error near line 14965: no such table: main.path_alias
Parse error near line 14966: no such table: main.path_alias_revision
Parse error near line 14967: no such table: main.block_content
Parse error near line 14968: no such table: main.block_content
Parse error near line 14969: no such table: main.block_content
Parse error near line 14972: no such table: main.block_content_field_data
Parse error near line 14973: no such table: main.block_content_field_data
Parse error near line 14974: no such table: main.block_content_field_data
Parse error near line 14975: no such table: main.block_content_field_data
Parse error near line 14976: no such table: main.block_content_field_data
Parse error near line 14977: no such table: main.block_content_field_revision
Parse error near line 14985: no such table: main.node
Parse error near line 14986: no such table: main.node
Parse error near line 14987: no such table: main.node
Parse error near line 14991: no such table: main.node_field_data
Parse error near line 14992: no such table: main.node_field_data
Parse error near line 14993: no such table: main.node_field_data
Parse error near line 14994: no such table: main.node_field_data
Parse error near line 14995: no such table: main.node_field_data
Parse error near line 14996: no such table: main.node_field_data
Parse error near line 14997: no such table: main.node_field_data
Parse error near line 14998: no such table: main.node_field_data
Parse error near line 14999: no such table: main.node_field_data
Parse error near line 15000: no such table: main.node_field_revision
Parse error near line 15001: no such table: main.node_field_revision
Parse error near line 15008: no such table: main.file_managed
Parse error near line 15009: no such table: main.file_managed
Parse error near line 15010: no such table: main.file_managed
Parse error near line 15011: no such table: main.file_managed
Parse error near line 15012: no such table: main.file_managed
Parse error near line 15021: no such table: main.media
Parse error near line 15022: no such table: main.media
Parse error near line 15023: no such table: main.media
Parse error near line 15026: no such table: main.media_field_data
Parse error near line 15027: no such table: main.media_field_data
Parse error near line 15028: no such table: main.media_field_data
Parse error near line 15029: no such table: main.media_field_data
Parse error near line 15030: no such table: main.media_field_data
Parse error near line 15031: no such table: main.media_field_data
Parse error near line 15032: no such table: main.media_field_revision
Parse error near line 15033: no such table: main.media_field_revision
Parse error near line 15034: no such table: main.media_field_revision
Parse error near line 15035: no such table: main.media__field_media_oembed_video
Parse error near line 15036: no such table: main.media__field_media_oembed_video
Parse error near line 15037: no such table: main.media_revision__field_media_oembed_video
Parse error near line 15038: no such table: main.media_revision__field_media_oembed_video
Parse error near line 15049: no such table: main.comment
Parse error near line 15050: no such table: main.comment
Parse error near line 15051: no such table: main.comment_field_data
Parse error near line 15052: no such table: main.comment_field_data
Parse error near line 15053: no such table: main.comment_field_data
Parse error near line 15054: no such table: main.comment_field_data
Parse error near line 15055: no such table: main.comment_field_data
Parse error near line 15056: no such table: main.comment_field_data
Parse error near line 15057: no such table: main.comment_field_data
Parse error near line 15058: no such table: main.comment_field_data
Parse error near line 15066: no such table: main.content_moderation_state
Parse error near line 15067: no such table: main.content_moderation_state
Parse error near line 15069: no such table: main.content_moderation_state_field_data
Parse error near line 15070: no such table: main.content_moderation_state_field_data
Parse error near line 15071: no such table: main.content_moderation_state_field_data
Parse error near line 15072: no such table: main.content_moderation_state_field_data
Parse error near line 15073: no such table: main.content_moderation_state_field_data
Parse error near line 15074: no such table: main.content_moderation_state_field_revision
Parse error near line 15075: no such table: main.content_moderation_state_field_revision
Parse error near line 15076: no such table: main.content_moderation_state_field_revision
Parse error near line 15077: no such table: main.content_moderation_state_field_revision
Parse error near line 15096: no such table: main.crop
Parse error near line 15097: no such table: main.crop
Parse error near line 15098: no such table: main.crop
Parse error near line 15101: no such table: main.crop_field_data
Parse error near line 15102: no such table: main.crop_field_data
Parse error near line 15103: no such table: main.crop_field_data
Parse error near line 15104: no such table: main.crop_field_data
Parse error near line 15105: no such table: main.crop_field_revision
Parse error near line 15106: no such table: main.taxonomy_term_data
Parse error near line 15107: no such table: main.taxonomy_term_data
Parse error near line 15108: no such table: main.taxonomy_term_data
Parse error near line 15111: no such table: main.taxonomy_term_field_data
Parse error near line 15112: no such table: main.taxonomy_term_field_data
Parse error near line 15113: no such table: main.taxonomy_term_field_data
Parse error near line 15114: no such table: main.taxonomy_term_field_data
Parse error near line 15115: no such table: main.taxonomy_term_field_data
Parse error near line 15116: no such table: main.taxonomy_term_field_data
Parse error near line 15117: no such table: main.taxonomy_term_field_revision
Parse error near line 15118: no such table: main.taxonomy_term_field_revision
Parse error near line 15158: no such table: main.webform_submission
Parse error near line 15159: no such table: main.webform_submission
Parse error near line 15160: no such table: main.webform_submission
Parse error near line 15161: no such table: main.webform_submission
Parse error near line 15173: no such table: main.menu_link_content
Parse error near line 15174: no such table: main.menu_link_content
Parse error near line 15177: no such table: main.menu_link_content_data
Parse error near line 15178: no such table: main.menu_link_content_data
Parse error near line 15179: no such table: main.menu_link_content_data
Parse error near line 15180: no such table: main.menu_link_content_data
Parse error near line 15181: no such table: main.menu_link_content_field_revision
Parse error near line 15182: no such table: main.menu_link_content_field_revision
Parse error near line 15184: no such table: main.shortcut
Parse error near line 15185: no such table: main.shortcut
Parse error near line 15186: no such table: main.shortcut_field_data
Parse error near line 15187: no such table: main.shortcut_field_data
Parse error near line 15188: no such table: main.shortcut_field_data
Parse error near line 15189: no such table: main.redirect
Parse error near line 15190: no such table: main.redirect
Parse error near line 15191: no such table: main.redirect
Parse error near line 15192: no such table: main.redirect
Parse error near line 15193: no such table: main.redirect
Parse error near line 15194: no such table: main.redirect
abhisekmazumdar commented 2 months ago

I encountered the same error. This is a rather unusual behaviour in which the site works for a while, but then I start experiencing a WSoD.

Thanks to @tsega for me with the initial debugging.

ddev -v
ddev version v1.23.0
brew leaves | grep ddev
ddev/ddev/ddev

Snippet of the error I get when I run ddev logs.

2024/05/09 06:13:57 [error] 2282#2282: *3 FastCGI sent in stderr: "PHP message: Uncaught PHP Exception Drupal\Core\Database\DatabaseExceptionWrapper: "SQLSTATE[HY000]: General error: 11 database disk image is malformed: INSERT INTO "cache_data" ("cid", "expire", "created", "tags", "checksum", "data", "serialized") VALUES (:db_insert_placeholder_0, :db_insert_placeholder_1, :db_insert_placeholder_2, :db_insert_placeholder_3, :db_insert_placeholder_4, :db_insert_placeholder_5, :db_insert_placeholder_6) ON CONFLICT ("cid") DO UPDATE SET "cid" = EXCLUDED."cid", "expire" = EXCLUDED."expire", "created" = EXCLUDED."created", "tags" = EXCLUDED."tags", "checksum" = EXCLUDED."checksum", "data" = EXCLUDED."data", "serialized" = EXCLUDED."serialized"; Array
(
    [:db_insert_placeholder_0] => route:[language]=en:/favicon.ico:
    [:db_insert_placeholder_1] => -1
    [:db_insert_placeholder_2] => 1715235237.007
    [:db_insert_placeholder_3] => route_match
    [:db_insert_placeholder_4] => 0
    [:db_insert_placeholder_5] => a:3:{s:4:"path";s:12:"/favicon.ico";s:5:"query";a:0" while reading response header from upstream, client: 172.18.0.4, server: , request: "GET /favicon.ico HTTP/1.1", upstream: "fastcgi://unix:/run/php-fpm.sock:", host: "starshot.ddev.site", referrer: "https://starshot.ddev.site/"
MuhammadMurtaza commented 1 month ago

same here @tsega. I used DBeaver and exactly the same cache bootstrap table was corrupted. I thought I was going to switch to MySQL but you already mentioned that there's still the same issue. But I don't think it's related to Drupal. I tried installing vanilla Drupal with --omit-containers=db, so I could use SQL Lite and the same issue happened. So it has something to do with ddev or sqlite support. There's already an issue open on ddev for supporting sqlite 3 for drupal 11

MuhammadMurtaza commented 1 month ago

Hey Guys @tsega @phenaproxima. I think I have solved the mystery. The docker's new file-sharing implementation VirtioFS most likely causing the issue. Switch to either gRPC FUSE or osxfs (Legacy), both seems to be working fine. My hardware and software info: macOs Sonoma 14.4.1 Apple M1 Docker desktop v4.2.9.0 DDev v1.23.0

abhisekmazumdar commented 1 month ago

Oh yes mine is set to VirtioFS too. I have heard that VirtioFS had some issue.

So far, the switch to gRPC FUSE appears to be working.

Thank you @MuhammadMurtaza.

phenaproxima commented 1 month ago

Whoa, that's fascinating. I would never have even known where to begin! Thanks for tracking this down.

How can we switch to gRPC Fuse? Is that something we can change in DDEV's config? If not, can we document how to do it in the README (under "Known issues & workarounds")? I would gladly merge a PR that does either or both of these things.

abhisekmazumdar commented 1 month ago

As far as I'm aware, this resides in Docker settings:

image

Which makes me feel that it can go under known issues.

phenaproxima commented 1 month ago

So it sounds like the way to change to gRPC FUSE is going to depend on your Docker provider...? I suppose if that's the case, then documenting the problem/workaround in the README is the way to go. Too bad it's so advanced, but hopefully it's a minority of folks who run into this.

abhisekmazumdar commented 1 month ago

I'm preparing the PR now. Thank you.

MuhammadMurtaza commented 1 month ago

Yeah, not sure how to set this per container. The setting seems to be universal. We will need to update the readme.

abhisekmazumdar commented 1 month ago

I just crossed checked. It doesn't happen when someone is using OrbStack. It's just the Docker Desktop issue.

abhisekmazumdar commented 1 month ago

The readme changes PR has been raised by @MuhammadMurtaza : https://github.com/phenaproxima/starshot-prototype/pull/66

phenaproxima commented 1 month ago

Whew! #66 is merged, so I think we can close this one out. Thanks, everyone!

tsega commented 1 month ago

@MuhammadMurtaza thanks for providing the solution! You're a 🌟

@phenaproxima and @abhisekmazumdar thanks for the follow up, really appreciate it! 🙏🏾

I can also confirm changing the Docker file sharing implementation to anything other than the VirtioFS fixes this issue. I have used the osxfs (legacy) option for now.