For a few weeks now, I've been getting an error when saving certain changes. This error, in Chrome, is

Error 324 (net::ERR_EMPTY_RESPONSE): The server closed the connection without sending any data.

After I click the save button, the page seems to load for a while (10 seconds or more), then directs to that Chrome error page. But, if I reload the page manually, the changes I've added have actually been saved. I've noticed this happening when: adding a new content type, adding a new field, saving changes to a view, disabling or enabling a module, and even clearing the cache.

After some digging, I found out that this error gets posted to Apache's error log every time this happens:

[Fri Mar 30 09:27:11 2012] [error] [client] PHP Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 12893929 bytes) in /var/www/drupal/includes/database.mysqli.inc on line 329, referer: http://mysite.com/admin/content/node-type/typename/fields/field_looptest/remove
[Fri Mar 30 09:27:12 2012] [notice] child pid 17934 exit signal Segmentation fault (11)

I have two sites I work on, one of which is simply a week-old backup version of the other. Interestingly, the error printed to the log for the up-to-date site is slightly different: The file that seems to be generating the error is includes/database.inc, line 225 instead of includes/database.mysqli.inc. In both cases, the line mentioned is simply an escape string function. mysqli_real_escape_string() and db_escape_string() specifically.

I'm at a loss. The fact that it's a Drupal core file generating the error is bothersome. Does anyone have any idea why this is happening?


So, after a few days of trial and error, I managed to fix this problem. (Although I still am not really sure what caused it...)

The fix that I found was to disable modules until the problem disappeared, then to re-enable those modules. That was it. The problem has not resurfaced for the past few weeks.

Now, some details: I first attempted to fix the problem on my "sandbox" server, disabling modules one at a time with the hope that the problem would go away. It did, and I noted which module(s) were the last to be disabled. However, taking that information back to my main site did not help. Instead, I disabled modules in bulk (everything that could be disabled on a first pass; i.e. all modules not required by another module). After a few passes, the problem did indeed disappear. I'm not sure what caused it or why. If my searches while trying to fix it were any indication, nobody else knows either. Just a quirk of Drupal 6 I suppose.

| improve this answer | |

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