# Error 502 randomly occurs when the project is shared

**URL:** <https://discourse.processing.org/t/error-502-randomly-occurs-when-the-project-is-shared/20028>\
**Category:** Beginners\
**Created:** [April 22, 2020, 10:17am UTC](https://discourse.processing.org/t/error-502-randomly-occurs-when-the-project-is-shared/20028 "2020-04-22T10:17:03Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![paco06](https://avatars.discourse-cdn.com/v4/letter/p/c0e974/32.png) [@paco06](https://discourse.processing.org/u/paco06)\
**Post date:** [April 22, 2020, 10:17am UTC](https://discourse.processing.org/t/error-502-randomly-occurs-when-the-project-is-shared/20028/1 "2020-04-22T10:17:03Z")

</div>

Hello I’m a P5.js newby…I developed 4 years ago a processing program and moved it to p5.js. It loads and works fine in the preview window. My problem occurs when I share the program, the program loading time increase randomly and create time out error. Here after the 2 cases:  
**-1st case** : “about:blank” appears during 30s and next the program shows up . It’s OK.  
**-2nd case** : “about:blank” appears during 59s and next “Error 502 occurs”.

Here after my questions:  
-Why the preview program is much faster to load than the shared program?  
-Why the time to load the program can move from 30s to 59s?  
-Some tips to reduce the load time? There are a lot of global Variables/Arrays, image…

Thanks a bunch  
/Pascal

---

<div class="post-metadata">

**Author:** ![jeremydouglass](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/jeremydouglass/32/20_2.png) [@jeremydouglass](https://discourse.processing.org/u/jeremydouglass)\
**Post date:** [May 11, 2020, 10:57pm UTC](https://discourse.processing.org/t/error-502-randomly-occurs-when-the-project-is-shared/20028/2 "2020-05-11T22:57:52Z")

</div>

Hi @paco06 – I hope that you were able to resolve your problem.

Usually there is no way to answer such questions unless you share your code – and/or a link to your code – and explain what you mean by “export” when you export it.
