Currently, I am developing a website using a free provider (000webhost) and focusing on integrating a chat feature. To achieve this, I have implemented an interval every 500 milliseconds that reads a file to check for new messages. When a new message is detected, I load all the messages from a .txt file into an HTML element.
The chat functionality is almost complete; however, I am facing a challenge where my site crashes after extended periods of chatting or being on the chat page (approximately 3 minutes or more). Each time this occurs, I have to wait for about an hour before regaining access to the site. I use JavaScript and AJAX to refresh the chat every half-second.
Has anyone encountered a similar issue and could provide insight into what might be going wrong? I attempted to research the problem on Google but did not find any helpful solutions.
Edit: After adjusting the interval for refreshing the chat to 2.5 seconds, the website no longer crashed. It seems like this modification has resolved the issue.