seanhess / hyperbole

Haskell interactive serverside web framework inspired by HTMX
Other
93 stars 6 forks source link

Examples crash with "file descriptor out of range" error #20

Closed demaledetti closed 4 months ago

demaledetti commented 4 months ago

Hi, thanks for Hyperbole, I share a lot of the motivation from your Discourse announcement and I'm looking forward to giving Hyperbole a try.

I just checked out 2c4da99457191c5c1e15b5cd8f8a38fc95ab411e and ran the examples but the webserver crashed after a bit of clicking around:

Starting Examples on http://localhost:3000 woot: file descriptor 10182576 out of range for select (0--1024). Recompile with -threaded to work around this.

I noticed the crash when I got a "connection refused" browser error message as I clicked on the "Query Params" link on the example app home page, after having visited all previous examples top to bottom and having played a bit with each of them.

I restarted the server and tried to reproduce but couldn't so far.

seanhess commented 4 months ago

Hello and welcome! Thanks for reporting this.

I just tried a fresh checkout, and it worked fine. You're running with cabal run, right? Let's try doing what it says and add RTS/threaded to the example package.yaml

    ghc-options:
      - -threaded
      - -rtsopts
      - -with-rtsopts=-N

I just pushed an update to add this. Can you try again on the latest main and let me know if it happens again?

seanhess commented 4 months ago

Commit is: b7ed4c44864da00e6881d7946b0a265bff7ca7a1

demaledetti commented 4 months ago

Thanks. Yes the crash happened on cabal run. I just pulled the latest version and will let you know if it happes again. Feel free to close the issue, I can reopen it if necessary.

seanhess commented 4 months ago

Great, let me know if you have any questions or anything else comes up!