How to speed up drupal : Clean up base64 encoded images

Hello! Recently we experienced a severe slowdown bottleneck with a Drupal site. After some debugging we decided to turn on mysql slow query logging. After watching the logs we noticed that while the content page was loading in Drupal’s administration back-end there was extremely long scrolling of encoded binary data : INSERT INTO cache_form (cid, serialized, created, expire, data) VALUES (‘form_state_form-xHslzQjLR4W0RX16BL5bG-7K9ewYMiSpj7n-tt7-MBA’, ‘1’, ‘1468987323’, ‘1469008923’, ‘ The scrolling was endless! Even though the content list view in Drupal paginates after displaying about 40-50 nodes, loading these data blobs for every node caused the page load time to take 2-3 minutes! Sometimes it even just timed out and failed with an error. This behavior would be dependent on the php.ini execution time settings and perhaps php-fpm configuration directives for memory allocation and whatnot. Whats worse, when this was happening, all other actions on the server were impossible to complete. This is because […]

How to export and import field collection data in Drupal

Hello! There are many great tools out there that make importing and exporting content into Drupal nodes very easy. We deal with custom Drupal content often and have extensively used many of the (amazing) tools available, such as node export, views data export and feed import , specifically with the field collection feeds addon. With all of these solutions, we had limited but no success in exporting our custom content + field collection data. Our field collections contained fields that were configured to store multiple values as an array, which may be why. We never tried the tools that didn’t work with different variations of field options in our field collections. They just didn’t work for us. So we looked into how hard it would be to write our own drush command to easily integrate into our code push system (the system through which code and data is propagated from […]