zend_mm_heap corrupted

Has Apache suddenly started telling you that the “zend_mm_heap” is corrupted? Rather than mucking around with output_buffering or other php.ini values as recommend in a couple of places, first check that, if you have a custom session manager (typically memcached), it is started and you are able to connect.

For example, if your session handling is setup as follows:

; Handler used to store/retrieve data.
; http://php.net/session.save-handler
;session.save_handler = files
session.save_handler = memcache
;session.save_path = "/tmp"
session.save_path = "tcp://localhost:11211?persistent=1&weight=1&timeout=1&retry_interval=15"

check to make sure that you can actually connect to localhost on port 11211:

$ telnet localhost 11211
Connected to localhost.localdomain.
Escape character is '^]'.
STAT pid 24041
STAT uptime 257289
STAT time 1321027200
STAT version 1.4.2

If you can’t connect, or the memcached server is not responding as above, then you’ve found the source of the “heap corruption”.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.