hydra-synth / hydra

Livecoding networked visuals in the browser
https://hydra.ojack.xyz
GNU Affero General Public License v3.0
2.13k stars 255 forks source link

memory leak / server crash #254

Closed ojack closed 1 year ago

ojack commented 1 year ago

Currently, https://hydra.ojack.xyz/ is crashing repeatedly.

Current server configuration:

emptyflash commented 1 year ago

Might make sense to separate the static frontend server and the sketch upload/WebRTC stuff.

rseymour commented 1 year ago

This is an idea w/o follow through, but you could maybe look into trying deno as the node runtime? Might be a non-starter, but perhaps: https://deno.com/runtime

I may experiment.

ojack commented 1 year ago

Might make sense to separate the static frontend server and the sketch upload/WebRTC stuff.

yess I think it is nice that the static site doesn't crash even if the server does, etc.

the code is already separate (/frontend, /backend) in the repo so it shouldn't be too complicated

emptyflash commented 1 year ago

@ojack also might not be a bad idea to add a CDN in front of the static stuff at some point to reduce the load on the server. Should probably ignore code and sketch_id query params.

On a related note, looks like the cert and custom sketch loading are broken with the new current setup, but it loads very fast.

Loading a custom sketch gets a 404 html page from github pages:

err getting sketches Error: <!DOCTYPE html>
<html>
  <head>
    <meta http-equiv="Content-type" content="text/html; charset=utf-8">
    <meta http-equiv="Content-Security-Policy" content="default-src 'none'; style-src 'unsafe-inline'; img-src data:; connect-src 'self'">
    <title>Page not found &middot; GitHub Pages</title>
    <style type="text/css" media="screen">

Seems like https://hydra.ojack.xyz/sketchById?sketch_id=43z8EKnWbkux5WPQ is the culprit.

ojack commented 1 year ago

What cert? Right now there is just a backup static site hosted on github :)

but actually it could make sense to keep it that way, but be able to talk to backend for webrtc and gallery

On Thu, Jun 8, 2023, 19:32 Cameron Alexander @.***> wrote:

@ojack https://github.com/ojack also might not be a bad idea to add a CDN in front of the static stuff at some point to reduce the load on the server. Should probably ignore code and sketch_id query params.

On a related note, looks like the cert and custom sketch loading are broken with the new current setup, but it loads very fast.

— Reply to this email directly, view it on GitHub https://github.com/hydra-synth/hydra/issues/254#issuecomment-1583069849, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABFOVSLDCLMBWM454R7L6OLXKIEBLANCNFSM6AAAAAAY6PU2UA . You are receiving this because you were mentioned.Message ID: @.***>

ojack commented 1 year ago

Okay, this has been addressed. This repo now contains just the editor, while the backend is at: https://github.com/hydra-synth/hydra-server

And the frontend is hosted on github at: https://github.com/hydra-synth/hydra-synth.github.io