Jefrey Sobreira Santos
Jefrey Sobreira Santos

Reputation: 672

Is there a limit for Javascript (continous loop) runtime?

I'm working on a digital signage/indoor media system based on HTML5/CSS3 instead of Flash. It works with separated modules (weather, twitter, news, photos, videos etc.) and that's how I run:

It will run in a server-ready computer and some big displays 24 hours per day, 7 days per week, with no time to rest, in a Chromium fullscreen window. All the modules must do "in time" requests, so the administrators can add or remove new images, the news and weather systems can work... without refreshing the window. All the timers (to change between modules, images etc.) are made with setInterval().

Yesterday morning it started running. The computer is never turned off, but I noticed this morning that the system frozen in one of the modules, after about 24 hours up. I refreshed the app and it's ok. Since the server is also used for many other company tasks, I don't know if it is due to some memory problem or really the Javascript limitation.

My question is: is there some limit time that the Javascript continuously? Or it can run for hours/days/weeks without any problem?

Upvotes: 1

Views: 137

Answers (1)

Exelian
Exelian

Reputation: 5888

The main limit will be memory leaks slowly eating away your memory. Other then that there's no real reason.

Upvotes: 1

Related Questions