Fixing slow queries and database deadlocks in Drupal without PHP profiling tools

Today I am going to show you how to autopilot monitoring and diagnose of

  • Slow queries
  • Long query wait times due to database locks
  • Database deadlocks

All of these


ChainedFastBackend in Drupal 7

ChainedFastBackend is a new cache backend in Drupal 8 that allows you to chain 2 cache backends.


Database Transactions in Drupal

This article is not about what transactions are, but the particularities of its implementation in Drupal.

Drupal database abstraction layer has the ability to handle transactions and nested transactions.

It uses the PDO transaction capabilities to start/commit/rollback the higher level transaction in the scope, and database specific functions such as SAVENPOINT to handle the nested transactions.

Transactions in Drupal are quite a mess to use:


Making namespaced callbacks work in Drupal 7 (without hacking core and with bound parameters)

What is the best way to prepare for Drupal 8 and make your projects easy (and cheap) to migrate to D8? Start using Drupal 8 programming patterns now as much as D7 allows you to....

I guess that most of you are already doing that - and have done for a few years now - with custom crafted frameworks that, as much as possible, use modern design patterns not stuck in 20 y/o spaguetty code. D7 is spaguetty, your custom modules and code need not to be so.


Using Heatmaps to boost conversions: Drupal integration

A heat map is a graphical representation of data where the values taken by a variable
in a two-dimensional map are represented as colours. — Wikipedia

Today we are introducing the simplest module ever: Drupal integration.

This module, after activation, deploys the necessary script files to allow integration with the service.


Drupal: Fields or Properties (or something else)

Making Drupal scale is hard. It is even harder if you application is big and complex. And one of the main problems is that usually not enough attention is paid to data storage. But let me tell you that the storage model you pick is the backspine of your application, its heart, its soul. 

No fancy UI is ever going to compensate for a slow, unmaintainable and crappy engineered piece of software. 


Benchmarking Drupal 8 on PHP 7-dev

It's been a while since I quick benchmarked Drupal 7 on PHP7. But at the time of that writing it was still not possible to benchmark D8 in PHP7, there were too many compatibility issues that simply would not let D8 boot on PHP7.

There is D8 on PHP7 initiative in this queue issue at that has helped get D8 working on PHP7.


PHP 7 nightlies for Windows

If you want to give PHP7 (PHPng) a try before it gets released, finding compiled binaries is not easy.

Use this link to access the official Windows nightly builds by the PHP team:

Are you running PHP on Windows or Azure? Consume the .Net framework from PHP thanks to NetPhp.


PDF Generation in PHP

This article is a follow up of our previous post Decent PDF Generation in Drupal.

As a quick recap, in that article we discussed how half-broken, slow, memory hungry and not business ready are all the available PDF generation libraries for PHP.


Only update changed fields or properties for an entity in Drupal

When you save (precisely for an update) an entity Drupal does a massive job:



Subscribe to Drupal On Windows RSS