in shutdown function current working directory is set to /

this fixes cache usage during error logging and rendering
support logging memory_limit error by further increasing the memory limit