Something is making your files drop to 0 byte. Thing is that unless you are actually making changes in the control panel while a server error occurs the config file should never be opened for writing, only as read only. That will not 0 a file. Your island cache files are getting zeroed out too. Sounds terribly as though your server or site is out of disc space or quota.
That's what you need to find out, why are files not able to be written to.