I finally got to the bottom of the occasional HTTP 500 (internal server) errors on weathersupermarket. The apache error log simply contains “premature end of script headers”, which isn’t much help. It turns out on shared hosting servers a background process monitors resource usage (CPU + RAM?) and kills off anything using too much.
The solution? – more optimization, move somewhere else.