Apparently the instability was due to to the fact that external SPI flash access was unprotected in a multi-threaded application. It is quite logical for a web server application to protect SPI flash from concurrent access requests. SPI flash driver needs to be updated to be made thread safe (it is better to make a new sflash driver altogether).
Thank you for the details. We are looking into this method.