function MapConfigBufferSizeAdapter() {
    this.formats = ['png', 'png32', 'mvt', 'grid.json'];
}

module.exports = MapConfigBufferSizeAdapter;

MapConfigBufferSizeAdapter.prototype.getMapConfig = function (user, requestMapConfig, params, context, callback) {
    if (!context.templateParams || !context.templateParams.buffersize) {
        return callback(null, requestMapConfig);
    }

    this.formats.forEach(function (format) {
        if (Number.isFinite(context.templateParams.buffersize[format])) {
            requestMapConfig.buffersize[format] = context.templateParams.buffersize[format];
        }
    });

    process.nextTick(function () {
        callback(null, requestMapConfig);
    });
};

@@ -622,24 +622,20 @@
     
-process.nextTick
+setImmediate
 (fun

Use setInmmediate vs process.nextTick