Comments (3)
Currently its failing with nginx reverse proxy in the docker image with:
2022/06/17 08:23:35 [error] 201#201: *4 sendfile() failed (32: Broken pipe) while sending request to upstream, client: 172.17.0.1, server: aldrune.com, request: "POST /wiki1/api/sessionaudio/ HTTP/1.1", upstream: "http://127.0.0.1:8080/sessionaudio/", host: "localhost", referrer: "http://localhost/wiki2/sessionaudio/Aldrune/create"
No idea where that issue comes from.
In other frameworks it's an issue with buffer size.
See:
https://stackoverflow.com/questions/57522982/nginx-502-errors-consistently-with-no-application-errors
https://stackoverflow.com/questions/35725438/sendfile-failed-32-broken-pipe-while-sending-request-to-upstream-nginx-502
I did set client_body_buffer_size
to 1 Mb and client_max_body_size
to 2 Gb, to no avail.
There is also a source that suggests this might be a https issue:
https://www.bigbinary.com/blog/not-using-https-might-be-breaking-file-uploads
However, I do not (yet) use HTTPS and my server isn't enforcing it, so that can't be the problem
from nimstoryfont.
As of commit e21f5cf this should be fixed.
However, locally the upload takes around 4 minutes now, with upload progress events claiming the upload finishes within seconds.
The current method also starts sucking up immense amounts of memory (> 500 Mb) during this process and eats a lot of CPU power.
This appears to be a general issue according to xflywind on discord:
It seems to be a common problem for frameworks based asynchttpserver and httpbeast: https://forum.nim-lang.org/t/5829 I'm going to wrap/rewrite h2o after fixing the vm bugs (nim-lang/Nim#19902)
What's left is waiting for xflywind to fix this issue so that the file upload works fine and fast
from nimstoryfont.
Surprisingly, it's working alright as long as you compile with httpx.
This is good enough for now
Tasks
task release, "Build a production release":
--verbose
--forceBuild:on
--opt:speed
--define:release
--threads:on
--mm:orc
--deepcopy:on
--define:lto
--define:ssl
#--define:usestd # stdlib asynchttpserver
--hints:off
--outdir:"."
setCommand "c", "src/nimstoryfont.nim"
from nimstoryfont.
Related Issues (20)
- Adding group to user is borked, fix that
- add a password reset view HOT 2
- use the same python lib as django for encryption HOT 1
- Create a SettingsFieldEnum HOT 1
- Set up a nimlangserver or at least look whether using it is viable HOT 3
- Fix SessionAudio download links
- Make this "installable"
- Make it so that adding a group to a user is a separate API call, not just a "patch" call on user
- Make User a subdir of authentication
- Introduce `SerializeManyProc` type and enforce usage of it in list procs HOT 1
- Move back to opaque tokens HOT 5
- Move `extractQueryParams` into allUrlParams HOT 1
- Add a mechanism that forbids circular locations
- fix borked addition of playerclass
- Remove pointless column from wikientries_image table for encounter id HOT 1
- Fix broken map uploading
- Check if password recovery actually works
- Make nimstoryfont work with nim 2.0 HOT 1
- Fix campaign admin endpoint throwing HTTP500 currently HOT 2
- Check if password hashing works after nim 2 update HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from nimstoryfont.