The macro in core/ngx_log.h is not correct: #define ngx_log_alloc_log(pool, log) ngx_palloc(pool, log, sizeof(ngx_log_t)) ngx_palloc only requires two arguments. This function is never used, but I was trying to use it in mod_wsgi! Manlio Perillo