# Javascript setInterval leads to "\[HTTP/1.1 508 Loop Detected" on infinityfree?

**URL:** <https://forum.infinityfree.com/t/javascript-setinterval-leads-to-http-1-1-508-loop-detected-on-infinityfree/80437>\
**Category:** Hosting Support\
**Created:** [August 9, 2023, 2:22am UTC](https://forum.infinityfree.com/t/javascript-setinterval-leads-to-http-1-1-508-loop-detected-on-infinityfree/80437 "2023-08-09T02:22:38Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![anon42821569](https://forum.infinityfree.com/letter_avatar/anon42821569/32/6_449c533f586939b6e5f246632a46421f.png) [@anon42821569](https://forum.infinityfree.com/u/anon42821569)\
**Post date:** [August 9, 2023, 2:22am UTC](https://forum.infinityfree.com/t/javascript-setinterval-leads-to-http-1-1-508-loop-detected-on-infinityfree/80437/1 "2023-08-09T02:22:38Z")

</div>

I am using javascript setInterval to loop call a php interface. Then the “[HTTP/1.1 508 Loop Detected” error occured. It is not allowed to use setInterval in infinityfree Hosting?

---

<div class="post-metadata">

**Author:** ![KangJL](https://forum.infinityfree.com/user_avatar/forum.infinityfree.com/kangjl/32/12130_2.png) [@KangJL](https://forum.infinityfree.com/u/KangJL)\
**Post date:** [August 9, 2023, 2:40am UTC](https://forum.infinityfree.com/t/javascript-setinterval-leads-to-http-1-1-508-loop-detected-on-infinityfree/80437/2 "2023-08-09T02:40:37Z")

</div>

I believe 508 meant limits of hosting has been reached

> **[Fair Usage Limits](https://forum.infinityfree.com/c/documentation/fair-usage-limits/19)**
>
> Official support articles about the various fair usage limits that are applied to free hosting.

---

<div class="post-metadata">

**Author:** ![Admin](https://forum.infinityfree.com/user_avatar/forum.infinityfree.com/admin/32/36437_2.png) [@Admin](https://forum.infinityfree.com/u/Admin)\
**Post date:** [August 9, 2023, 8:47am UTC](https://forum.infinityfree.com/t/javascript-setinterval-leads-to-http-1-1-508-loop-detected-on-infinityfree/80437/3 "2023-08-09T08:47:48Z")

</div>

The 508 error typically means that you’ve exceeded the limits of your hosting account, which is usually the Entry Process limit. You can learn more about that here:

> [@This site/page has used all available php / apache processes](https://forum.infinityfree.com/t/this-site-page-has-used-all-available-php-apache-processes/49336):
>
> Some people see an error page on their website with the following contents: This site / page has used all avaialble php / apache processes allowed on free hosting. Refreshing the page once the amount of apache / php processes are reduced will cause the site to work We would recommend upgrading your hosting account at IFastNet Premium hosting accounts, premium hosting accounts have MUCH higher resources dedicated to them. This article explains why you may see this page, and what you can do …

You can use `setInterval` on your website if you want. But please make sure you’re not constantly hammering the server in the background to fetch new data. That will run through your account’s limits very quickly, and cause issues such as the one you’re experiencing right now. So you’ll want to make sure that the polling speed is reasonable, and that you’re not doing multiple polling loops for your account.

---

<div class="post-metadata">

**Author:** ![system](https://infinityfree-forum-uploads.s3.dualstack.eu-central-1.amazonaws.com/original/3X/b/0/b024fd3fa88bae093c9576e55c2c94e33f890206.svg) [@system](https://forum.infinityfree.com/u/system)\
**Post date:** [August 16, 2023, 8:48am UTC](https://forum.infinityfree.com/t/javascript-setinterval-leads-to-http-1-1-508-loop-detected-on-infinityfree/80437/4 "2023-08-16T08:48:12Z")

</div>

Closed on August 16, 2023, 8:48am UTC

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.
